2
0
Daniele Bartolini 2 өдөр өмнө
parent
commit
d754ca47f6

+ 4 - 2
docs/gameplay/unit_interaction.rst

@@ -6,6 +6,8 @@ At some point you will probably need to reference units from the Lua scripts to
 manipulate their properties, be notified of particular events and make them do
 something interesting.
 
+.. _getting_unit_handles:
+
 Getting Unit handles
 --------------------
 
@@ -28,8 +30,8 @@ spawned in a world this way:
 		-- Do something with Unit u.
 	end
 
-To obtain a specific Unit by name (its name as set in the Level Editor, *not*
-the unit name itself):
+To obtain a specific Unit by name (its name as set in the :ref:`Level Editor
+<renaming_objects>`, *not* the unit name itself):
 
 .. code:: lua
 

BIN
docs/level_editor/images/level_tree.png


+ 1 - 0
docs/level_editor/index.rst

@@ -17,5 +17,6 @@ Console.
 	project_browser
 	console
 	inspector
+	level_tree
 	level_viewport
 	texture_settings

+ 1 - 1
docs/level_editor/level_editor.rst

@@ -18,7 +18,7 @@ Number Name                    What it shows
 1      :ref:`Project Browser`  The current project's contents.
 2      :ref:`Console`          Messages from the Level Editor, the Game and other Runtimes.
 3      :ref:`Inspector`        The properties of the currently selected object.
-4      Level Tree              A hierarchical view of all the objects in the Level.
+4      :ref:`Level Tree`       A hierarchical view of all the objects in the Level.
 5      :ref:`Level Viewport`   The Level being edited.
 6      Menubar                 Common commands for editing / debugging / opening editors etc.
 7      Toolbar                 Tools and common options for editing.

+ 35 - 0
docs/level_editor/level_tree.rst

@@ -0,0 +1,35 @@
+==========
+Level Tree
+==========
+
+The Level Tree shows a hierarchical view of the objects in the current Level.
+Use it to inspect structure, organize items, and perform common actions such
+as duplicating, renaming, and saving Units as prefabs.
+
+.. figure:: images/level_tree.png
+   :align: center
+
+   The Level Tree showing some Units in a Level and an empty Sounds folder.
+
+Saving Unit prefabs
+===================
+
+Right-click any Unit in the tree and choose ``Save as Prefab...``. In the file
+dialog that opens, pick a unique name for the prefab and click ``Save``. The
+command creates a reusable prefab resource you can place in other Levels.
+
+Renaming objects
+================
+
+Objects receive an automatic name when created. To give an object a clearer
+name, right-click it in the Level Tree and choose ``Rename...`` from the
+context menu. Descriptive names are useful when you need to refer to objects
+by name from :ref:`gameplay code <getting_unit_handles>`.
+
+Searching and sorting
+=====================
+
+Use the Search Bar at the top of the Level Tree to find objects by name. Begin
+typing and matching objects appear instantly; press ``Esc`` to exit search
+mode. The button to the right of the Search Bar let you choose the sorting
+criteria to change how items are ordered in the tree.