summaryrefslogtreecommitdiff
path: root/doc/classes/ResourceFormatLoader.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/ResourceFormatLoader.xml')
-rw-r--r--doc/classes/ResourceFormatLoader.xml17
1 files changed, 13 insertions, 4 deletions
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index cfa1b9f5d7..2b6376f2cd 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -28,7 +28,7 @@
<param index="0" name="path" type="String" />
<param index="1" name="add_types" type="bool" />
<description>
- If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency.
+ If implemented, gets the dependencies of a given resource. If [param add_types] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency.
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
@@ -67,8 +67,17 @@
<param index="2" name="use_sub_threads" type="bool" />
<param index="3" name="cache_mode" type="int" />
<description>
- Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure.
- The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
+ Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [param original_path] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure.
+ The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
+ </description>
+ </method>
+ <method name="_recognize_path" qualifiers="virtual const">
+ <return type="bool" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="type" type="StringName" />
+ <description>
+ Tells whether or not this loader should load a resource from its resource path for a given type.
+ If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions], and if the type is within the ones provided by [method _get_resource_type].
</description>
</method>
<method name="_rename_dependencies" qualifiers="virtual const">
@@ -76,7 +85,7 @@
<param index="0" name="path" type="String" />
<param index="1" name="renames" type="Dictionary" />
<description>
- If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths.
+ If implemented, renames dependencies within the given resource and saves it. [param renames] is a dictionary [code]{ String =&gt; String }[/code] mapping old dependency paths to new paths.
Returns [constant OK] on success, or an [enum Error] constant in case of failure.
</description>
</method>