ResourcePreloader

    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.

    • void add_resource ( 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 “ N” where N is an incrementing number starting from 2.


    • get_resource ( String name ) const

    Returns the resource associated to name.



    • has_resource ( String name ) const

    Returns true if the preloader contains a resource associated to .


    • void remove_resource ( name )

    Removes the resource associated to name from the preloader.