Resource Preloader Node.
    public class ResourcePreloader : 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.

Inheritance Chain

Constructors

    public ResourcePreloader()

Properties

    public Collections.Array Resources { get; set; }

Methods

    public void AddResource(string name, Resource resource)

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.

    public Resource GetResource(string name)

Returns the resource associated to name.

    public string[] GetResourceList()

Returns the list of resources inside the preloader.

    public bool HasResource(string name)

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

    public void RemoveResource(string name)

Removes the resource associated to name from the preloader.

    public void RenameResource(string name, string newname)

Renames a resource inside the preloader from name to newname.

Tags: