diff options
Diffstat (limited to 'doc/classes/PackedScene.xml')
-rw-r--r-- | doc/classes/PackedScene.xml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index c7fe7d8c37..97595a6984 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -22,12 +22,12 @@ AddChild(scene); [/csharp] [/codeblocks] - [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidDynamicBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. + [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. [codeblocks] [gdscript] # Create the objects. var node = Node2D.new() - var body = RigidDynamicBody2D.new() + var body = RigidBody2D.new() var collision = CollisionShape2D.new() # Create the object hierarchy. @@ -48,7 +48,7 @@ [csharp] // Create the objects. var node = new Node2D(); - var body = new RigidDynamicBody2D(); + var body = new RigidBody2D(); var collision = new CollisionShape2D(); // Create the object hierarchy. @@ -92,7 +92,7 @@ <return type="Node" /> <param index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0" /> <description> - Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_INSTANCED] notification on the root node. + Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_SCENE_INSTANTIATED] notification on the root node. </description> </method> <method name="pack"> |