ResourcePreloader
Inherits: Node < Object Resource Preloader Node.
Description
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.
@GDScript.preload built-in method which can be used in most situations, leaving the use of ResourcePreloader for more advanced scenarios.
Methods
Method Descriptions
- add_resource ( String name, Resource resource )
name. If a resource with the givennamealready exists, the new resource will be renamed to “nameN” where N is an incrementing number starting from 2.
- Resource get_resource ( String name ) const
name.
- PoolStringArray get_resource_list ( ) const Returns the list of resources inside the preloader.
- bool has_resource ( String name ) const
trueif the preloader contains a resource associated toname.
- remove_resource ( String name )
namefrom the preloader.
- rename_resource ( String name, String newname )
nametonewname.
