2017-09-12 22:42:36 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2021-04-26 13:14:51 +02:00
<class name= "ResourcePreloader" inherits= "Node" version= "3.4" >
2017-09-12 22:42:36 +02:00
<brief_description >
Resource Preloader Node.
</brief_description>
<description >
2019-02-07 17:00:16 +01:00
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.
2019-06-18 18:04:29 +02:00
GDScript has a simplified [method @GDScript.preload] built-in method which can be used in most situations, leaving the use of [ResourcePreloader] for more advanced scenarios.
2017-09-12 22:42:36 +02:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "add_resource" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "name" type= "String" />
<argument index= "1" name= "resource" type= "Resource" />
2017-09-12 22:42:36 +02:00
<description >
2019-02-07 17:00:16 +01:00
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.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "get_resource" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Resource" />
<argument index= "0" name= "name" type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2019-02-07 17:00:16 +01:00
Returns the resource associated to [code]name[/code].
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "get_resource_list" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "PoolStringArray" />
2017-09-12 22:42:36 +02:00
<description >
2019-02-07 17:00:16 +01:00
Returns the list of resources inside the preloader.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "has_resource" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "bool" />
<argument index= "0" name= "name" type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2019-04-17 13:42:56 +02:00
Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code].
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "remove_resource" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "name" type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2019-02-07 17:00:16 +01:00
Removes the resource associated to [code]name[/code] from the preloader.
2017-09-12 22:42:36 +02:00
</description>
</method>
<method name= "rename_resource" >
2021-07-30 15:28:05 +02:00
<return type= "void" />
<argument index= "0" name= "name" type= "String" />
<argument index= "1" name= "newname" type= "String" />
2017-09-12 22:42:36 +02:00
<description >
2019-02-07 17:00:16 +01:00
Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code].
2017-09-12 22:42:36 +02:00
</description>
</method>
</methods>
<constants >
</constants>
</class>