class_resourcepreloader.rst 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_ResourcePreloader:
  4. ResourcePreloader
  5. =================
  6. **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Resource Preloader Node.
  11. Member Functions
  12. ----------------
  13. +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | void | :ref:`add_resource<class_ResourcePreloader_add_resource>` **(** :ref:`String<class_string>` name, :ref:`Object<class_object>` resource **)** |
  15. +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`Object<class_object>` | :ref:`get_resource<class_ResourcePreloader_get_resource>` **(** :ref:`String<class_string>` name **)** const |
  17. +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`StringArray<class_stringarray>` | :ref:`get_resource_list<class_ResourcePreloader_get_resource_list>` **(** **)** const |
  19. +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`bool<class_bool>` | :ref:`has_resource<class_ResourcePreloader_has_resource>` **(** :ref:`String<class_string>` name **)** const |
  21. +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | void | :ref:`remove_resource<class_ResourcePreloader_remove_resource>` **(** :ref:`String<class_string>` name **)** |
  23. +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | void | :ref:`rename_resource<class_ResourcePreloader_rename_resource>` **(** :ref:`String<class_string>` name, :ref:`String<class_string>` newname **)** |
  25. +----------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------+
  26. Description
  27. -----------
  28. 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.
  29. Member Function Description
  30. ---------------------------
  31. .. _class_ResourcePreloader_add_resource:
  32. - void **add_resource** **(** :ref:`String<class_string>` name, :ref:`Object<class_object>` resource **)**
  33. Add a resource to the preloader. Set the text-id that will be used to identify it (retrieve it/erase it/etc).
  34. .. _class_ResourcePreloader_get_resource:
  35. - :ref:`Object<class_object>` **get_resource** **(** :ref:`String<class_string>` name **)** const
  36. Return the resource given a text-id.
  37. .. _class_ResourcePreloader_get_resource_list:
  38. - :ref:`StringArray<class_stringarray>` **get_resource_list** **(** **)** const
  39. Return the list of resources inside the preloader.
  40. .. _class_ResourcePreloader_has_resource:
  41. - :ref:`bool<class_bool>` **has_resource** **(** :ref:`String<class_string>` name **)** const
  42. Return true if the preloader has a given resource.
  43. .. _class_ResourcePreloader_remove_resource:
  44. - void **remove_resource** **(** :ref:`String<class_string>` name **)**
  45. Remove a resource from the preloader by text id.
  46. .. _class_ResourcePreloader_rename_resource:
  47. - void **rename_resource** **(** :ref:`String<class_string>` name, :ref:`String<class_string>` newname **)**
  48. Rename a resource inside the preloader, from a text-id to a new text-id.