diff options
Diffstat (limited to 'doc/classes/ResourceLoader.xml')
-rw-r--r-- | doc/classes/ResourceLoader.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 533bc9ec28..1cf775f389 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -74,6 +74,8 @@ <argument index="0" name="path" type="String"> </argument> <description> + Returns the resource loaded by [method load_threaded_request]. + If this is called before the loading thread is done (i.e. [method load_threaded_get_status] is not [constant THREAD_LOAD_LOADED]), the calling thread will be blocked until the resource has finished loading. </description> </method> <method name="load_threaded_get_status"> @@ -84,6 +86,8 @@ <argument index="1" name="progress" type="Array" default="[ ]"> </argument> <description> + Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [code]path[/code]. See [enum ThreadLoadStatus] for possible return values. + An array variable can optionally be passed via [code]progress[/code], and will return a one-element array containing the percentage of completion of the threaded loading. </description> </method> <method name="load_threaded_request"> @@ -96,6 +100,7 @@ <argument index="2" name="use_sub_threads" type="bool" default="false"> </argument> <description> + Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). </description> </method> <method name="set_abort_on_missing_resources"> @@ -110,12 +115,16 @@ </methods> <constants> <constant name="THREAD_LOAD_INVALID_RESOURCE" value="0" enum="ThreadLoadStatus"> + The resource is invalid, or has not been loaded with [method load_threaded_request]. </constant> <constant name="THREAD_LOAD_IN_PROGRESS" value="1" enum="ThreadLoadStatus"> + The resource is still being loaded. </constant> <constant name="THREAD_LOAD_FAILED" value="2" enum="ThreadLoadStatus"> + Some error occurred during loading and it failed. </constant> <constant name="THREAD_LOAD_LOADED" value="3" enum="ThreadLoadStatus"> + The resource was loaded successfully and can be accessed via [method load_threaded_get]. </constant> </constants> </class> |