summaryrefslogtreecommitdiff
path: root/doc/classes/PackedScene.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/PackedScene.xml')
-rw-r--r--doc/classes/PackedScene.xml11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index 852b1d836a..8d810bc9c4 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -1,11 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PackedScene" inherits="Resource" category="Core" version="3.0-rc1">
+<class name="PackedScene" inherits="Resource" category="Core" version="3.1">
<brief_description>
An abstraction of a serialized scene.
</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>