:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the ResourceInteractiveLoader.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_ResourceInteractiveLoader: ResourceInteractiveLoader ========================= **Inherits:** :ref:`Reference` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Interactive :ref:`Resource` loader. Methods ------- +---------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Resource` | :ref:`get_resource` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_stage` **(** **)** const | +---------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_stage_count` **(** **)** const | +---------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`poll` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`wait` **(** **)** | +---------------------------------------+--------------------------------------------------------------------------------------------------+ Description ----------- Interactive :ref:`Resource` loader. This object is returned by :ref:`ResourceLoader` when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying loading bars/percentages. Method Descriptions ------------------- .. _class_ResourceInteractiveLoader_method_get_resource: - :ref:`Resource` **get_resource** **(** **)** Returns the loaded resource if the load operation completed successfully, ``null`` otherwise. ---- .. _class_ResourceInteractiveLoader_method_get_stage: - :ref:`int` **get_stage** **(** **)** const Returns the load stage. The total amount of stages can be queried with :ref:`get_stage_count`. ---- .. _class_ResourceInteractiveLoader_method_get_stage_count: - :ref:`int` **get_stage_count** **(** **)** const Returns the total amount of stages (calls to :ref:`poll`) needed to completely load this resource. ---- .. _class_ResourceInteractiveLoader_method_poll: - :ref:`Error` **poll** **(** **)** Polls the loading operation, i.e. loads a data chunk up to the next stage. Returns :ref:`@GlobalScope.OK` if the poll is successful but the load operation has not finished yet (intermediate stage). This means :ref:`poll` will have to be called again until the last stage is completed. Returns :ref:`@GlobalScope.ERR_FILE_EOF` if the load operation has completed successfully. The loaded resource can be obtained by calling :ref:`get_resource`. Returns another :ref:`Error` code if the poll has failed. ---- .. _class_ResourceInteractiveLoader_method_wait: - :ref:`Error` **wait** **(** **)** Polls the loading operation successively until the resource is completely loaded or a :ref:`poll` fails. Returns :ref:`@GlobalScope.ERR_FILE_EOF` if the load operation has completed successfully. The loaded resource can be obtained by calling :ref:`get_resource`. Returns another :ref:`Error` code if a poll has failed, aborting the operation.