浏览代码

docs: add 'Console'

Daniele Bartolini 4 天之前
父节点
当前提交
842807743a

+ 60 - 0
docs/level_editor/console.rst

@@ -0,0 +1,60 @@
+=======
+Console
+=======
+
+The Console displays information, warnings, errors, and debug output from the
+Level Editor, the running game, and other engine components. It also lets you
+interact with runtime instances by sending commands and Lua expressions.
+
+.. image:: images/console.png
+
+Runtime connections
+===================
+
+Each engine runtime spawned by the Level Editor is connected via TCP/IP, and
+the Console is the main UI for communicating with those instances. By default
+the Console is set to communicate with the editor runtime itself. When you
+start the game from the Level Editor, Crown switches the Console to
+communicate with the game runtime. You can also select manually which runtime
+the Console talks to using the runtime selector:
+
+.. image:: images/console_runtime_selector.svg
+
+Commands
+========
+
+You can type both commands and Lua expressions in the Command Bar. Use
+commands for low-level testing, profiling, or engine configuration. Commands
+must be prefixed with a colon (``:``) so they are distinguished from Lua
+expressions. Type ``:help`` in the Command Bar to see the available commands.
+
+See :ref:`console commands` for full documentation.
+
+Lua expressions
+===============
+
+You can send arbitrary Lua expressions to the connected runtime. Enter a Lua
+expression in the Command Bar and press ``Enter``. The runtime evaluates the
+expression and prints the result back to the Console. This is useful for
+inspecting state, calling engine APIs, or invoking game code while the game
+is running.
+
+.. image:: images/console_lua_expression.svg
+
+History navigation
+==================
+
+The Console keeps a history of executed commands and expressions. Use the ``Up
+Arrow`` and ``Down Arrow`` keys to navigate backward and forward through
+recent entries. The maximum history size is configurable from Preferences
+dialog.
+
+Resource ID lookup
+==================
+
+For efficiency, Crown runtimes in most cases use hashed numeric identifiers
+instead of plain-text strings. When the Console detects such numeric IDs, it
+attempts to resolve them back to readable names so logs are easier to
+understand:
+
+.. image:: images/console_id_lookup.svg

二进制
docs/level_editor/images/console.png


文件差异内容过多而无法显示
+ 44 - 0
docs/level_editor/images/console_id_lookup.svg


文件差异内容过多而无法显示
+ 44 - 0
docs/level_editor/images/console_lua_expression.svg


文件差异内容过多而无法显示
+ 45 - 0
docs/level_editor/images/console_runtime_selector.svg


+ 1 - 0
docs/level_editor/index.rst

@@ -15,5 +15,6 @@ Console.
 
 	level_editor
 	project_browser
+	console
 	level_viewport
 	texture_settings

+ 1 - 1
docs/level_editor/level_editor.rst

@@ -16,7 +16,7 @@ The Level Editor is split into several panels:
 Number Name                    What it shows
 ====== ======================= =============
 1      :ref:`Project Browser`  The current project's contents.
-2      Console                 Messages from the Level Editor, the Game and other Runtimes.
+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.
 5      :ref:`Level Viewport`   The Level being edited.

部分文件因为文件数量过多而无法显示