ResourcePreloader

    Category: Core

    Resource Preloader Node.

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

    • void add_resource ( name, Resource resource )

    Adds a resource to the preloader with the given . 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.



    • get_resource_list ( ) const

    Returns the list of resources inside the preloader.


    • bool has_resource ( name ) const

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



    • void rename_resource ( String name, newname )

    Renames a resource inside the preloader from name to newname.