Inherits: Node < Object

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 can be retrieved from the preloader.

GDScript has a simplified @GDScript.preload built-in method which can be used in most situations, leaving the use of ResourcePreloader for more advanced scenarios.


voidadd_resource ( String name, Resource resource )
Resourceget_resource ( String name ) const
PoolStringArrayget_resource_list ( ) const
boolhas_resource ( String name ) const
voidremove_resource ( String name )
voidrename_resource ( String name, String newname )

Method Descriptions

Adds a resource to the preloader with the given name. If a resource with the given name already exists, the new resource will be renamed to “name N” where N is an incrementing number starting from 2.

Returns the resource associated to name.

Returns the list of resources inside the preloader.

Returns true if the preloader contains a resource associated to name.

  • void remove_resource ( String name )

Removes the resource associated to name from the preloader.

Renames a resource inside the preloader from name to newname.

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.