@@ -47,12 +47,10 @@ There are five main sections inside the TSCN file:
47473. Nodes
48484. Connections
4949
50- The file descriptor looks like ``[gd_scene load_steps=4 format=3 uid="uid://cecaux1sm7mo0"] ``
51- and should be the first entry in the file. The ``load_steps `` parameter is equal to the
52- total amount of resources (internal and external) plus one (for the file itself).
53- If the file has no resources, ``load_steps `` is omitted. The engine will
54- still load the file correctly if ``load_steps `` is incorrect, but this will affect
55- loading bars and any other piece of code relying on that value.
50+ The file descriptor looks like ``[gd_scene format=3 uid="uid://cecaux1sm7mo0"] ``
51+ and should be the first entry in the file. Note that scenes saved before Godot 4.6
52+ will also have a ``load_steps=<int> `` attribute in the file descriptor. This
53+ attribute is now deprecated and should be ignored if present.
5654
5755``uid `` is a unique string-based identifier representing the scene. This is
5856used by the engine to track files that are moved around, even while the editor
@@ -92,15 +90,19 @@ so on. For example, a Node3D looks like:
9290
9391::
9492
95- [node name="Cube" type="Node3D"]
93+ [node name="Cube" type="Node3D" unique_id=224283918 ]
9694 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 3)
9795
9896The scene tree
9997--------------
10098
101- The scene tree is made up of… nodes! The heading of each node consists of
102- its name, parent and (most of the time) a type. For example:
103- ``[node name="PlayerCamera" type="Camera" parent="Player/Head"] ``
99+ The scene tree is made up of… nodes! The heading of each node consists of its
100+ name, parent, a unique ID (used to track nodes even if they are moved or
101+ renamed), and most of the time, a type. For example: ``[node name="PlayerCamera"
102+ type="Camera" parent="Player/Head" unique_id=1697057368] ``
103+
104+ Note that ``unique_id `` is only present in scenes saved with Godot 4.6 or later.
105+ Therefore, it is not guaranteed to be present.
104106
105107Other valid keywords include:
106108
@@ -120,10 +122,10 @@ the path should be ``"."``. Here is an example scene tree
120122
121123::
122124
123- [node name="Player" type="Node3D"] ; The scene root
124- [node name="Arm" type="Node3D" parent="."] ; Parented to the scene root
125- [node name="Hand" type="Node3D" parent="Arm"] ; Child of "Arm"
126- [node name="Finger" type="Node3D" parent="Arm/Hand"] ; Child of "Hand"
125+ [node name="Player" type="Node3D" unique_id=1155673912 ] ; The scene root
126+ [node name="Arm" type="Node3D" parent="." unique_id=1010797352 ] ; Parented to the scene root
127+ [node name="Hand" type="Node3D" parent="Arm" unique_id=536436825] ; Child of "Arm"
128+ [node name="Finger" type="Node3D" parent="Arm/Hand" unique_id=1732647084 ] ; Child of "Hand"
127129
128130.. tip ::
129131
@@ -138,7 +140,7 @@ collision, visuals (mesh + light) and a camera parented to the RigidBody3D:
138140
139141::
140142
141- [gd_scene load_steps=4 format=3 uid="uid://cecaux1sm7mo0"]
143+ [gd_scene format=3 uid="uid://cecaux1sm7mo0"]
142144
143145 [sub_resource type="SphereShape3D" id="SphereShape3D_tj6p1"]
144146
@@ -147,20 +149,20 @@ collision, visuals (mesh + light) and a camera parented to the RigidBody3D:
147149 [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k54se"]
148150 albedo_color = Color(1, 0.639216, 0.309804, 1)
149151
150- [node name="Ball" type="RigidBody3D"]
152+ [node name="Ball" type="RigidBody3D" unique_id=1358867382 ]
151153
152- [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
154+ [node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1279975976 ]
153155 shape = SubResource("SphereShape3D_tj6p1")
154156
155- [node name="MeshInstance3D" type="MeshInstance3D" parent="."]
157+ [node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=558852834 ]
156158 mesh = SubResource("SphereMesh_4w3ye")
157159 surface_material_override/0 = SubResource("StandardMaterial3D_k54se")
158160
159- [node name="OmniLight3D" type="OmniLight3D" parent="."]
161+ [node name="OmniLight3D" type="OmniLight3D" parent="." unique_id=1581292810 ]
160162 light_color = Color(1, 0.698039, 0.321569, 1)
161163 omni_range = 10.0
162164
163- [node name="Camera3D" type="Camera3D" parent="."]
165+ [node name="Camera3D" type="Camera3D" parent="." unique_id=795715540 ]
164166 transform = Transform3D(1, 0, 0, 0, 0.939693, 0.34202, 0, -0.34202, 0.939693, 0, 1, 3)
165167
166168NodePath
@@ -187,7 +189,7 @@ For example, the ``skeleton`` property in the MeshInstance3D node called
187189
188190::
189191
190- [node name="mesh" type="MeshInstance3D" parent="Armature01"]
192+ [node name="mesh" type="MeshInstance3D" parent="Armature01" unique_id=1638249225 ]
191193 skeleton = NodePath("..")
192194
193195Skeleton3D
@@ -208,7 +210,7 @@ Here's an example of a skeleton node with two bones:
208210
209211::
210212
211- [node name="Skeleton3D" type="Skeleton3D" parent="PlayerModel/Robot_Skeleton" index="0"]
213+ [node name="Skeleton3D" type="Skeleton3D" parent="PlayerModel/Robot_Skeleton" index="0" unique_id=542985694 ]
212214 bones/1/position = Vector3(0.114471, 2.19771, -0.197845)
213215 bones/1/rotation = Quaternion(0.191422, -0.0471201, -0.00831942, 0.980341)
214216 bones/2/position = Vector3(-2.59096e-05, 0.236002, 0.000347473)
@@ -227,12 +229,12 @@ An example of a :ref:`class_Marker3D` node parented to a bone in Skeleton:
227229
228230::
229231
230- [node name="GunBone" type="BoneAttachment3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D" index="5"]
232+ [node name="GunBone" type="BoneAttachment3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D" index="5" unique_id=63481392 ]
231233 transform = Transform3D(0.333531, 0.128981, -0.933896, 0.567174, 0.763886, 0.308015, 0.753209, -0.632331, 0.181604, -0.323915, 1.07098, 0.0497144)
232234 bone_name = "hand.R"
233235 bone_idx = 55
234236
235- [node name="ShootFrom" type="Marker3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D/GunBone"]
237+ [node name="ShootFrom" type="Marker3D" parent="PlayerModel/Robot_Skeleton/Skeleton3D/GunBone" unique_id=679926736 ]
236238 transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.4, 0)
237239
238240AnimationPlayer
@@ -353,7 +355,7 @@ Here's an example of an ArrayMesh saved to its own ``.tres`` file. Some fields w
353355
354356::
355357
356- [gd_resource type="ArrayMesh" load_steps=2 format=3 uid="uid://dww8o7hsqrhx5"]
358+ [gd_resource type="ArrayMesh" format=3 uid="uid://dww8o7hsqrhx5"]
357359
358360 [ext_resource type="Material" path="res://player/model/playerobot.tres" id="1_r3bjq"]
359361
@@ -423,7 +425,7 @@ AnimationPlayer for brevity:
423425
424426::
425427
426- [gd_scene load_steps=4 format=3 uid="uid://cdyt3nktp6y6"]
428+ [gd_scene format=3 uid="uid://cdyt3nktp6y6"]
427429
428430 [sub_resource type="Animation" id="Animation_r2qdp"]
429431 resource_name = "scale_down"
@@ -450,15 +452,15 @@ AnimationPlayer for brevity:
450452
451453 [sub_resource type="BoxMesh" id="BoxMesh_u688r"]
452454
453- [node name="Node3D" type="Node3D"]
455+ [node name="Node3D" type="Node3D" unique_id=2076735200 ]
454456
455- [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
457+ [node name="AnimationPlayer" type="AnimationPlayer" parent="." unique_id=2139773137 ]
456458 autoplay = "scale_down"
457459 libraries = {
458460 "": SubResource("AnimationLibrary_4qx36")
459461 }
460462
461- [node name="Box" type="MeshInstance3D" parent="."]
463+ [node name="Box" type="MeshInstance3D" parent="." unique_id=711004519 ]
462464 mesh = SubResource("BoxMesh_u688r")
463465
464466For generic property ``value `` tracks, ``keys `` is a dictionary containing 3
0 commit comments