1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Improve the ResourcePreloader documentation

This commit is contained in:
Hugo Locurcio
2019-02-07 17:00:16 +01:00
parent 3736a65f24
commit 4b51e8a975

View File

@@ -4,7 +4,7 @@
Resource Preloader Node. Resource Preloader Node.
</brief_description> </brief_description>
<description> <description>
Resource Preloader Node. This node is used to preload sub-resources inside a scene, so when the scene is loaded all the resources are ready to use and be retrieved from here. This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>
@@ -19,6 +19,7 @@
<argument index="1" name="resource" type="Resource"> <argument index="1" name="resource" type="Resource">
</argument> </argument>
<description> <description>
Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2.
</description> </description>
</method> </method>
<method name="get_resource" qualifiers="const"> <method name="get_resource" qualifiers="const">
@@ -27,14 +28,14 @@
<argument index="0" name="name" type="String"> <argument index="0" name="name" type="String">
</argument> </argument>
<description> <description>
Return the resource given a text-id. Returns the resource associated to [code]name[/code].
</description> </description>
</method> </method>
<method name="get_resource_list" qualifiers="const"> <method name="get_resource_list" qualifiers="const">
<return type="PoolStringArray"> <return type="PoolStringArray">
</return> </return>
<description> <description>
Return the list of resources inside the preloader. Returns the list of resources inside the preloader.
</description> </description>
</method> </method>
<method name="has_resource" qualifiers="const"> <method name="has_resource" qualifiers="const">
@@ -43,7 +44,7 @@
<argument index="0" name="name" type="String"> <argument index="0" name="name" type="String">
</argument> </argument>
<description> <description>
Return true if the preloader has a given resource. Returns true if the preloader contains a resource associated to [code]name[/code].
</description> </description>
</method> </method>
<method name="remove_resource"> <method name="remove_resource">
@@ -52,7 +53,7 @@
<argument index="0" name="name" type="String"> <argument index="0" name="name" type="String">
</argument> </argument>
<description> <description>
Remove a resource from the preloader by text id. Removes the resource associated to [code]name[/code] from the preloader.
</description> </description>
</method> </method>
<method name="rename_resource"> <method name="rename_resource">
@@ -63,7 +64,7 @@
<argument index="1" name="newname" type="String"> <argument index="1" name="newname" type="String">
</argument> </argument>
<description> <description>
Rename a resource inside the preloader, from a text-id to a new text-id. Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
</description> </description>
</method> </method>
</methods> </methods>