mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Sync with current master branch (cc5135959)
This commit is contained in:
@@ -20,6 +20,8 @@ Singleton used to load resource files from the filesystem.
|
||||
|
||||
It uses the many :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine.
|
||||
|
||||
\ **Note:** You have to import the files into the engine first to load them using :ref:`load<class_ResourceLoader_method_load>`. If you want to load :ref:`Image<class_Image>`\ s at run-time, you may use :ref:`Image.load<class_Image_method_load>`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data<class_AudioStreamMP3_property_data>`.
|
||||
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
@@ -28,6 +30,8 @@ Tutorials
|
||||
Methods
|
||||
-------
|
||||
|
||||
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`add_resource_format_loader<class_ResourceLoader_method_add_resource_format_loader>` **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader, :ref:`bool<class_bool>` at_front=false **)** |
|
||||
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`exists<class_ResourceLoader_method_exists>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="" **)** |
|
||||
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
@@ -47,6 +51,8 @@ Methods
|
||||
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`load_threaded_request<class_ResourceLoader_method_load_threaded_request>` **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="", :ref:`bool<class_bool>` use_sub_threads=false **)** |
|
||||
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`remove_resource_format_loader<class_ResourceLoader_method_remove_resource_format_loader>` **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader **)** |
|
||||
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_abort_on_missing_resources<class_ResourceLoader_method_set_abort_on_missing_resources>` **(** :ref:`bool<class_bool>` abort **)** |
|
||||
+---------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -94,6 +100,16 @@ enum **CacheMode**:
|
||||
Method Descriptions
|
||||
-------------------
|
||||
|
||||
.. _class_ResourceLoader_method_add_resource_format_loader:
|
||||
|
||||
- void **add_resource_format_loader** **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader, :ref:`bool<class_bool>` at_front=false **)**
|
||||
|
||||
Registers a new :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`. The ResourceLoader will use the ResourceFormatLoader as described in :ref:`load<class_ResourceLoader_method_load>`.
|
||||
|
||||
This method is performed implicitly for ResourceFormatLoaders written in GDScript (see :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` for more information).
|
||||
|
||||
----
|
||||
|
||||
.. _class_ResourceLoader_method_exists:
|
||||
|
||||
- :ref:`bool<class_bool>` **exists** **(** :ref:`String<class_String>` path, :ref:`String<class_String>` type_hint="" **)**
|
||||
@@ -184,6 +200,14 @@ Loads the resource using threads. If ``use_sub_threads`` is ``true``, multiple t
|
||||
|
||||
----
|
||||
|
||||
.. _class_ResourceLoader_method_remove_resource_format_loader:
|
||||
|
||||
- void **remove_resource_format_loader** **(** :ref:`ResourceFormatLoader<class_ResourceFormatLoader>` format_loader **)**
|
||||
|
||||
Unregisters the given :ref:`ResourceFormatLoader<class_ResourceFormatLoader>`.
|
||||
|
||||
----
|
||||
|
||||
.. _class_ResourceLoader_method_set_abort_on_missing_resources:
|
||||
|
||||
- void **set_abort_on_missing_resources** **(** :ref:`bool<class_bool>` abort **)**
|
||||
|
||||
Reference in New Issue
Block a user