Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/gameplay/unit_interaction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
--------------------

Expand All @@ -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

Expand Down
Binary file added docs/level_editor/images/inspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions docs/level_editor/images/inspector_reveal_resource.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/level_editor/images/level_tree.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/level_editor/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ Console.
level_editor
project_browser
console
inspector
level_tree
level_viewport
texture_settings
40 changes: 40 additions & 0 deletions docs/level_editor/inspector.rst
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions docs/level_editor/level_editor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
35 changes: 35 additions & 0 deletions docs/level_editor/level_tree.rst
Original file line number Diff line number Diff line change
@@ -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.