diff --git a/docs/gameplay/unit_interaction.rst b/docs/gameplay/unit_interaction.rst index 76036e7e9e..8320fbf321 100644 --- a/docs/gameplay/unit_interaction.rst +++ b/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 +`, *not* the unit name itself): .. code:: lua diff --git a/docs/level_editor/images/inspector.png b/docs/level_editor/images/inspector.png new file mode 100644 index 0000000000..be19e90b47 Binary files /dev/null and b/docs/level_editor/images/inspector.png differ diff --git a/docs/level_editor/images/inspector_entry_expression.png b/docs/level_editor/images/inspector_entry_expression.png new file mode 100644 index 0000000000..d5d3c648ac Binary files /dev/null and b/docs/level_editor/images/inspector_entry_expression.png differ diff --git a/docs/level_editor/images/inspector_reveal_resource.svg b/docs/level_editor/images/inspector_reveal_resource.svg new file mode 100644 index 0000000000..39bcc19628 --- /dev/null +++ b/docs/level_editor/images/inspector_reveal_resource.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + diff --git a/docs/level_editor/images/level_tree.png b/docs/level_editor/images/level_tree.png new file mode 100644 index 0000000000..d9a5f75799 Binary files /dev/null and b/docs/level_editor/images/level_tree.png differ diff --git a/docs/level_editor/images/project_browser_thumbnails.png b/docs/level_editor/images/project_browser_thumbnails.png new file mode 100644 index 0000000000..23db17007f Binary files /dev/null and b/docs/level_editor/images/project_browser_thumbnails.png differ diff --git a/docs/level_editor/index.rst b/docs/level_editor/index.rst index 1fa9b928a0..c8f24d0408 100644 --- a/docs/level_editor/index.rst +++ b/docs/level_editor/index.rst @@ -16,5 +16,7 @@ Console. level_editor project_browser console + inspector + level_tree level_viewport texture_settings diff --git a/docs/level_editor/inspector.rst b/docs/level_editor/inspector.rst new file mode 100644 index 0000000000..05eb030dba --- /dev/null +++ b/docs/level_editor/inspector.rst @@ -0,0 +1,40 @@ +========= +Inspector +========= + +The Inspector lets you view and modify the properties of selected objects in +the :ref:`Level Viewport`. Select one or more objects to display their +components and editable fields. Changes made in the Inspector are applied +immediately and reflected in the Level Viewport. + +.. figure:: images/inspector.png + :align: center + + The Inspector showing the properties of a Unit. + +Expression evaluator +==================== + +Numeric entries in the Inspector can evaluate simple mathematical expressions, +which is handy for precise adjustments. Type an expression and press +``Enter`` to evaluate it. The special variable ``x`` represents the current +value in the field. For example, if a field contains ``2``, entering ``x + +1`` changes it to ``3``. + +.. figure:: images/inspector_entry_expression.png + :align: center + + A simple expression in a numeric entry. + +Revealing resources +=================== + +Properties that reference resources include a ``Reveal`` shortcut that opens +the :ref:`Project Browser` and highlights the referenced resource. The reveal +action attempts to locate the resource even when the resource type is hidden +or when the file resides in a mapped source directory that is not shown. + +.. figure:: images/inspector_reveal_resource.svg + :align: center + + The ``Reveal`` button. diff --git a/docs/level_editor/level_editor.rst b/docs/level_editor/level_editor.rst index 0013439272..ed08407f2c 100644 --- a/docs/level_editor/level_editor.rst +++ b/docs/level_editor/level_editor.rst @@ -17,8 +17,8 @@ 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 Inspector The properties of the currently selected object. -4 Level Tree A hierarchical view of all the objects in the Level. +3 :ref:`Inspector` The properties of the currently selected object. +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. diff --git a/docs/level_editor/level_tree.rst b/docs/level_editor/level_tree.rst new file mode 100644 index 0000000000..4117b1b294 --- /dev/null +++ b/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 `. + +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.