class_resourceinteractiveloader.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ResourceInteractiveLoader.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ResourceInteractiveLoader:
  5. ResourceInteractiveLoader
  6. =========================
  7. **Inherits:** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Interactive Resource Loader.
  12. Methods
  13. -------
  14. +----------------------------------------+-------------------------------------------------------------------------------------------+
  15. | :ref:`Resource<class_Resource>` | :ref:`get_resource<class_ResourceInteractiveLoader_get_resource>` **(** **)** |
  16. +----------------------------------------+-------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_stage<class_ResourceInteractiveLoader_get_stage>` **(** **)** const |
  18. +----------------------------------------+-------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`get_stage_count<class_ResourceInteractiveLoader_get_stage_count>` **(** **)** const |
  20. +----------------------------------------+-------------------------------------------------------------------------------------------+
  21. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`poll<class_ResourceInteractiveLoader_poll>` **(** **)** |
  22. +----------------------------------------+-------------------------------------------------------------------------------------------+
  23. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`wait<class_ResourceInteractiveLoader_wait>` **(** **)** |
  24. +----------------------------------------+-------------------------------------------------------------------------------------------+
  25. Description
  26. -----------
  27. 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.
  28. Method Descriptions
  29. -------------------
  30. .. _class_ResourceInteractiveLoader_get_resource:
  31. - :ref:`Resource<class_Resource>` **get_resource** **(** **)**
  32. Return the loaded resource (only if loaded). Otherwise, returns null.
  33. .. _class_ResourceInteractiveLoader_get_stage:
  34. - :ref:`int<class_int>` **get_stage** **(** **)** const
  35. Return the load stage. The total amount of stages can be queried with :ref:`get_stage_count<class_ResourceInteractiveLoader_get_stage_count>`
  36. .. _class_ResourceInteractiveLoader_get_stage_count:
  37. - :ref:`int<class_int>` **get_stage_count** **(** **)** const
  38. Return the total amount of stages (calls to :ref:`poll<class_ResourceInteractiveLoader_poll>`) needed to completely load this resource.
  39. .. _class_ResourceInteractiveLoader_poll:
  40. - :ref:`Error<enum_@GlobalScope_Error>` **poll** **(** **)**
  41. 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>`.
  42. .. _class_ResourceInteractiveLoader_wait:
  43. - :ref:`Error<enum_@GlobalScope_Error>` **wait** **(** **)**