diff options
author | kobewi <kobewi4e@gmail.com> | 2023-10-06 01:24:49 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2023-12-10 20:30:01 +0100 |
commit | a1aa1a468f1b8e9457c985197fdc90d4486a517a (patch) | |
tree | 79bb2398e9916ba2e5c46647c42488b58ca2ab14 /modules/gdscript/doc_classes | |
parent | b94eb58d35b3dd8a9f522bc90df0db73862ef326 (diff) | |
download | redot-engine-a1aa1a468f1b8e9457c985197fdc90d4486a517a.tar.gz |
Clarify some descriptions regarding resource cache
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r-- | modules/gdscript/doc_classes/@GDScript.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index 3da6bcf10c..fcb7a11a14 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -162,7 +162,7 @@ <return type="Resource" /> <param index="0" name="path" type="String" /> <description> - Returns a [Resource] from the filesystem located at the absolute [param path]. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use [method preload]. + Returns a [Resource] from the filesystem located at the absolute [param path]. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use [method preload]. This method is equivalent of using [method ResourceLoader.load] with [constant ResourceLoader.CACHE_MODE_REUSE]. [b]Note:[/b] Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script. [codeblock] # Load a scene called "main" located in the root of the project directory and cache it in a variable. |