summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-11 21:59:35 +0100
committerGitHub <noreply@github.com>2019-12-11 21:59:35 +0100
commit334ed8f0c272254b00fb2393fa4323ae1fe708e3 (patch)
tree40b0eee66a50ebacefcb5c2283295e682128d313 /modules
parentcca13462f1803a18ba8bfde99e9f79a9e7b84156 (diff)
parent6cc3bb2d9bfeb0efb529a53bf6a2a52964c3894e (diff)
Merge pull request #34282 from YeldhamDev/load_doc_absolute
Add note in 'load()' docs that the path must be absolute
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index d1f52d2422..502a68cd61 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -616,9 +616,10 @@
Loads a resource from the filesystem located at [code]path[/code].
[b]Note:[/b] Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing [b]Copy Path[/b].
[codeblock]
- # Load a scene called main located in the root of the project directory
+ # Load a scene called main located in the root of the project directory.
var main = load("res://main.tscn")
[/codeblock]
+ [b]Important:[/b] The path must be absolute, a local path will just return [code]null[/code].
</description>
</method>
<method name="log">
@@ -786,7 +787,7 @@
Returns a resource from the filesystem that is loaded during script parsing.
[b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path".
[codeblock]
- # Load a scene called main located in the root of the project directory
+ # Load a scene called main located in the root of the project directory.
var main = preload("res://main.tscn")
[/codeblock]
</description>