1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
- .. _class_ResourcePreloader:
- ResourcePreloader
- =================
- **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
- **Category:** Core
- Brief Description
- -----------------
- Resource Preloader Node.
- Member Functions
- ----------------
- +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`add_resource<class_ResourcePreloader_add_resource>` **(** :ref:`String<class_string>` name, :ref:`Object<class_object>` resource **)** |
- +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Object<class_object>` | :ref:`get_resource<class_ResourcePreloader_get_resource>` **(** :ref:`String<class_string>` name **)** const |
- +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`StringArray<class_stringarray>` | :ref:`get_resource_list<class_ResourcePreloader_get_resource_list>` **(** **)** const |
- +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`has_resource<class_ResourcePreloader_has_resource>` **(** :ref:`String<class_string>` name **)** const |
- +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`remove_resource<class_ResourcePreloader_remove_resource>` **(** :ref:`String<class_string>` name **)** |
- +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`rename_resource<class_ResourcePreloader_rename_resource>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` newname **)** |
- +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
- Description
- -----------
- 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 be retrieved from here.
- Member Function Description
- ---------------------------
- .. _class_ResourcePreloader_add_resource:
- - void **add_resource** **(** :ref:`String<class_string>` name, :ref:`Object<class_object>` resource **)**
- Add a resource to the preloader. Set the text-id that will be used to identify it (retrieve it/erase it/etc).
- .. _class_ResourcePreloader_get_resource:
- - :ref:`Object<class_object>` **get_resource** **(** :ref:`String<class_string>` name **)** const
- Return the resource given a text-id.
- .. _class_ResourcePreloader_get_resource_list:
- - :ref:`StringArray<class_stringarray>` **get_resource_list** **(** **)** const
- Return the list of resources inside the preloader.
- .. _class_ResourcePreloader_has_resource:
- - :ref:`bool<class_bool>` **has_resource** **(** :ref:`String<class_string>` name **)** const
- Return true if the preloader has a given resource.
- .. _class_ResourcePreloader_remove_resource:
- - void **remove_resource** **(** :ref:`String<class_string>` name **)**
- Remove a resource from the preloader by text id.
- .. _class_ResourcePreloader_rename_resource:
- - void **rename_resource** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` newname **)**
- Rename a resource inside the preloader, from a text-id to a new text-id.
|