|
@@ -23,14 +23,14 @@
|
|
<method name="_reset_state" qualifiers="virtual">
|
|
<method name="_reset_state" qualifiers="virtual">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<description>
|
|
<description>
|
|
- For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], this method should be implemented to correctly clear the resource's state.
|
|
|
|
|
|
+ For resources that store state in non-exported properties, such as via [method Object._validate_property] or [method Object._get_property_list], this method must be implemented to clear them.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="_set_path_cache" qualifiers="virtual const">
|
|
<method name="_set_path_cache" qualifiers="virtual const">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="path" type="String" />
|
|
<param index="0" name="path" type="String" />
|
|
<description>
|
|
<description>
|
|
- Sets the resource's path to [param path] without involving the resource cache.
|
|
|
|
|
|
+ Override this method to execute additional logic after [method set_path_cache] is called on this object.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="_setup_local_to_scene" qualifiers="virtual">
|
|
<method name="_setup_local_to_scene" qualifiers="virtual">
|
|
@@ -94,7 +94,7 @@
|
|
<return type="String" />
|
|
<return type="String" />
|
|
<param index="0" name="path" type="String" />
|
|
<param index="0" name="path" type="String" />
|
|
<description>
|
|
<description>
|
|
- Returns the unique identifier for the resource with the given [param path] from the resource cache. If the resource is not loaded and cached, an empty string is returned.
|
|
|
|
|
|
+ From the internal cache for scene-unique IDs, returns the ID of this resource for the scene at [param path]. If there is no entry, an empty string is returned. Useful to keep scene-unique IDs the same when implementing a VCS-friendly custom resource format by extending [ResourceFormatLoader] and [ResourceFormatSaver].
|
|
[b]Note:[/b] This method is only implemented when running in an editor context. At runtime, it returns an empty string.
|
|
[b]Note:[/b] This method is only implemented when running in an editor context. At runtime, it returns an empty string.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
@@ -113,13 +113,13 @@
|
|
<method name="is_built_in" qualifiers="const">
|
|
<method name="is_built_in" qualifiers="const">
|
|
<return type="bool" />
|
|
<return type="bool" />
|
|
<description>
|
|
<description>
|
|
- Returns [code]true[/code] if the resource is built-in (from the engine) or [code]false[/code] if it is user-defined.
|
|
|
|
|
|
+ Returns [code]true[/code] if the resource is saved on disk as a part of another resource's file.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="reset_state">
|
|
<method name="reset_state">
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<description>
|
|
<description>
|
|
- For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], override [method _reset_state] to correctly clear the resource's state.
|
|
|
|
|
|
+ Makes the resource clear its non-exported properties. See also [method _reset_state]. Useful when implementing a custom resource format by extending [ResourceFormatLoader] and [ResourceFormatSaver].
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="set_id_for_path">
|
|
<method name="set_id_for_path">
|
|
@@ -127,7 +127,7 @@
|
|
<param index="0" name="path" type="String" />
|
|
<param index="0" name="path" type="String" />
|
|
<param index="1" name="id" type="String" />
|
|
<param index="1" name="id" type="String" />
|
|
<description>
|
|
<description>
|
|
- Sets the unique identifier to [param id] for the resource with the given [param path] in the resource cache. If the unique identifier is empty, the cache entry using [param path] is removed if it exists.
|
|
|
|
|
|
+ In the internal cache for scene-unique IDs, sets the ID of this resource to [param id] for the scene at [param path]. If [param id] is empty, the cache entry for [param path] is cleared. Useful to keep scene-unique IDs the same when implementing a VCS-friendly custom resource format by extending [ResourceFormatLoader] and [ResourceFormatSaver].
|
|
[b]Note:[/b] This method is only implemented when running in an editor context.
|
|
[b]Note:[/b] This method is only implemented when running in an editor context.
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
@@ -135,7 +135,7 @@
|
|
<return type="void" />
|
|
<return type="void" />
|
|
<param index="0" name="path" type="String" />
|
|
<param index="0" name="path" type="String" />
|
|
<description>
|
|
<description>
|
|
- Sets the resource's path to [param path] without involving the resource cache.
|
|
|
|
|
|
+ Sets the resource's path to [param path] without involving the resource cache. Useful for handling [enum ResourceFormatLoader.CacheMode] values when implementing a custom resource format by extending [ResourceFormatLoader] and [ResourceFormatSaver].
|
|
</description>
|
|
</description>
|
|
</method>
|
|
</method>
|
|
<method name="setup_local_to_scene" deprecated="This method should only be called internally.">
|
|
<method name="setup_local_to_scene" deprecated="This method should only be called internally.">
|