diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-03-28 23:07:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 23:07:03 +0200 |
commit | 13d5ee01f9d62e8a4b867b46e902b5d9d25f9bd1 (patch) | |
tree | 87aafbbfdabd707edb2abc072d14a9ccd6393a2d /doc/classes/PackedScene.xml | |
parent | b59ae81538cc626c2effaffdf77009f1fa85cfb6 (diff) |
[DOCS] Node & PackedScene (#17833)
* [DOCS] Node: SceneSaver -> PackedScene
* [DOCS] PackedScene: Code example, resolve TODO
Diffstat (limited to 'doc/classes/PackedScene.xml')
-rw-r--r-- | doc/classes/PackedScene.xml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index cf89e6a2df..8d810bc9c4 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -5,7 +5,14 @@ </brief_description> <description> A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. - TODO: explain ownership, and that node does not need to own itself + Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). Note that the node doesn't need to own itself. + Example of saving a node: + [codeblock] + var scene = PackedScene.new() + var result = scene.pack(child) + if result == OK: + ResourceSaver.save("res://path/name.scn", scene) // or user://... + [/codeblock] </description> <tutorials> </tutorials> |