class_resourceinteractiveloader.rst 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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_ResourceInteractiveLoader:
  4. ResourceInteractiveLoader
  5. =========================
  6. **Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Interactive Resource Loader.
  11. Member Functions
  12. ----------------
  13. +------------------------------+--------------------------------------------------------------------------------------------+
  14. | :ref:`Object<class_object>` | :ref:`get_resource<class_ResourceInteractiveLoader_get_resource>` **(** **)** |
  15. +------------------------------+--------------------------------------------------------------------------------------------+
  16. | :ref:`int<class_int>` | :ref:`get_stage<class_ResourceInteractiveLoader_get_stage>` **(** **)** const |
  17. +------------------------------+--------------------------------------------------------------------------------------------+
  18. | :ref:`int<class_int>` | :ref:`get_stage_count<class_ResourceInteractiveLoader_get_stage_count>` **(** **)** const |
  19. +------------------------------+--------------------------------------------------------------------------------------------+
  20. | :ref:`int<class_int>` | :ref:`poll<class_ResourceInteractiveLoader_poll>` **(** **)** |
  21. +------------------------------+--------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`wait<class_ResourceInteractiveLoader_wait>` **(** **)** |
  23. +------------------------------+--------------------------------------------------------------------------------------------+
  24. Description
  25. -----------
  26. Interactive Resource Loader. This object is returned by ResourceLoader when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying load bars/percentages.
  27. Member Function Description
  28. ---------------------------
  29. .. _class_ResourceInteractiveLoader_get_resource:
  30. - :ref:`Object<class_object>` **get_resource** **(** **)**
  31. Return the loaded resource (only if loaded). Otherwise, returns null.
  32. .. _class_ResourceInteractiveLoader_get_stage:
  33. - :ref:`int<class_int>` **get_stage** **(** **)** const
  34. Return the load stage. The total amount of stages can be queried with :ref:`get_stage_count<class_ResourceInteractiveLoader_get_stage_count>`
  35. .. _class_ResourceInteractiveLoader_get_stage_count:
  36. - :ref:`int<class_int>` **get_stage_count** **(** **)** const
  37. Return the total amount of stages (calls to :ref:`poll<class_ResourceInteractiveLoader_poll>`) needed to completely load this resource.
  38. .. _class_ResourceInteractiveLoader_poll:
  39. - :ref:`int<class_int>` **poll** **(** **)**
  40. Poll the load. If OK is returned, this means poll will have to be called again. If ERR_FILE_EOF is returned, them the load has finished and the resource can be obtained by calling :ref:`get_resource<class_ResourceInteractiveLoader_get_resource>`.
  41. .. _class_ResourceInteractiveLoader_wait:
  42. - :ref:`int<class_int>` **wait** **(** **)**