summaryrefslogtreecommitdiffstats
path: root/doc/classes/Resource.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/Resource.xml')
-rw-r--r--doc/classes/Resource.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index 85372288e7..cec936ac3e 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -59,6 +59,12 @@
[/codeblock]
</description>
</method>
+ <method name="generate_scene_unique_id" qualifiers="static">
+ <return type="String" />
+ <description>
+ Generates a unique identifier for a resource to be contained inside a [PackedScene], based on the current date, time, and a random value. The returned string is only composed of letters ([code]a[/code] to [code]y[/code]) and numbers ([code]0[/code] to [code]8[/code]). See also [member resource_scene_unique_id].
+ </description>
+ </method>
<method name="get_local_scene" qualifiers="const">
<return type="Node" />
<description>
@@ -98,6 +104,12 @@
The unique path to this resource. If it has been saved to disk, the value will be its filepath. If the resource is exclusively contained within a scene, the value will be the [PackedScene]'s filepath, followed by a unique identifier.
[b]Note:[/b] Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use [method take_over_path].
</member>
+ <member name="resource_scene_unique_id" type="String" setter="set_scene_unique_id" getter="get_scene_unique_id">
+ An unique identifier relative to the this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a [PackedScene]. If the resource is not inside a scene, this property is empty by default.
+ [b]Note:[/b] When the [PackedScene] is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from [method generate_scene_unique_id].
+ [b]Note:[/b] Setting this property does not emit the [signal changed] signal.
+ [b]Warning:[/b] When setting, the ID must only consist of letters, numbers, and underscores. Otherwise, it will fail and default to a randomly generated ID.
+ </member>
</members>
<signals>
<signal name="changed">