U3D
Open-source, cross-platform 2D and 3D game engine built in C++
Loading...
Searching...
No Matches
Editor instructions

The Urho3D editor is a script application that can be run with the Urho3D player application. To start, execute any of these commands: (in the bin directory) Editor.bat, Editor.sh or Urho3DPlayer Scripts/Editor.as

All the command line options supported by Urho3D player application are available for Editor as well. Additionally, Editor also supports the following command line options:

-scene </path/to/scene.xml>     Load a scene after starting up

Hint: to get more content to look at, run the Physics sample application (bin/Data/Scripts/11_Physics.as), and press F5. This saves a scene file called Physics.xml into the Data/Scenes subdirectory, which can be loaded in the editor. Scenes utilized by the NinjaSnowWar and SceneAndUILoad examples also exist in the Data/Scenes subdirectory, and the NinjaSnowWar object "prefabs" are in the Data/Objects subdirectory.

Controls (standard style hotkeys)

Left mouse         - Select nodes or drag the node transform gizmo. Hold Shift to
                     select components instead. Hold Ctrl to multiselect.
Right mouse        - Hold down and move mouse to look around
Middle mouse       - Hold down orbits the camera
Shift+Middle mouse - Hold down pans the camera
Mouse wheel        - Camera zoom in/out
WSAD or arrows     - Move
Shift+WSAD         - Move faster
E                  - Ascend
Q                  - Descend
Shift+E,Q          - Ascend or descend faster

F/Home             - Center view on currently selected
Numpad5            - Toggle orthographic/perspective camera
Numpad1            - Front view
Numpad3            - Right hand view
Numpad7/9          - Top view

Ctrl+Numpad1       - Back view
Ctrl+Numpad3       - Left view
Ctrl+Numpad7/9     - Bottom view

Ctrl+1,2,3         - Object manipulation mode: move/rotate/scale
Ctrl+4             - Object selection mode, no manipulation
Ctrl+5             - Toggle between world and local axes manipulation
Ctrl+6,7           - Cycle through components to pick: geometries, lights, zones,
                     collision shapes; and ui-elements
Ctrl+arrows        - Manipulate node in X & Z directions
Ctrl+pgup/pgdn     - Manipulate node in Y direction
Ctrl+plus/minus    - Scale node uniformly (scale mode only)
Ctrl+Shift+N       - New scene
Ctrl+O             - Open scene
Ctrl+S             - Save scene
Ctrl+Shift+S       - Save scene as
Ctrl+A             - Select all root level nodes
Ctrl+Shift+A       - Deselect all nodes
Ctrl+X,C,V         - Cut/copy/paste node or component
Ctrl+D             - Duplicate node or component
Ctrl+E             - Enable/disable node hierarchy or component
Ctrl+U             - Unparent scene node
Ctrl+H             - Open the scene hierarchy window
Ctrl+I             - Open the attribute inspector window
Ctrl+P             - Toggle scene update on/off
Ctrl+W             - Cycle through solid, wireframe and point rendering
Ctrl+Z             - Undo
Ctrl+Y             - Redo
Ctrl+Space         - Open quick menu
Alt+I              - Toggle component debug icons
Alt+W              - Open color wheel menu
ESC                - Close the file selector or editor settings window
DEL                - Delete node or component
F1                 - Toggle console
F2                 - Toggle rendering debug geometry
F3                 - Toggle physics debug geometry
F4                 - Toggle octree debug geometry
F5                 - Toggle navigation debug geometry
F11                - Captures a screenshot
F12                - Toggle UI

The editor setting "Pan using middle mouse button" switches the controls to the following:

Middle mouse       - Hold down pans the camera
Shift+Middle mouse - Hold down orbits the camera

The editor setting "Rotate around selection" controls if the camera orbits around selection or the center of the view

The PaintSelect-tool usage:

Key C              - Enable/Disable PaintSelection-tool (circle) for selecting origins in viewport, Hold Ctrl during painting with circle to enable deselection operation
Key Space          - Show/Hide name for nearly placed origins in viewport while ShowOrigins are enabled in toolbar

Controls (Blender style hotkeys)

Hotkeys list show only differences with standard style

Left mouse         - Drag the node manipulator gizmo
Middle mouse       - Hold down orbits the camera
Shift+middle mouse - Hold down pans the camera
Right mouse        - Select objects
Shift+F            - Enter/Exit camera's flying mode
G,R,S              - Object manipulation mode: move/rotate/scale ( note: camera flying mode must be off to do this manipulation)
Cycle press G,R,S  - Toggle between world and local axes manipulation
Shift+D            - Duplicate node or component
H                  - Enable/disable node hierarchy or component
Alt+H              - Enable all nodes hierarchy or component in scene
Alt+P              - Unparent scene node
Ctrl+P             - Parent all selected scene nodes to last selected node
Z                  - Cycle through solid, wireframe and point rendering
M                  - Show/Hide LayerEditor
X                  - Delete node or component
Alt+D              - Smart Duplicate (note: select one of axises on gizmo to show direction for next instance)
Key "." or Del     - Center view on currently selected

Press right mouse button in the 3D view if you want to defocus the active window without changing the object selection.

The "Pan using middle mouse button" option has no effect in Blender hotkeys mode.

Workflow

When you start with an empty scene, set the resource path first (File -> Set resource path). This is the base directory, under which the subdirectories Models, Materials & Textures will be created as you import assets.

Scenes should be saved either into this base directory, or into its immediate subdirectory, named for example Scenes or Levels.

Check the Editor settings window so that the camera parameters match the size of the objects you are using.

The "Remember resource path" option in the settings window controls whether the resource path you set will be remembered on the next run.

The editor settings will be saved on exit to a file Urho3D\Editor\Config.xml in the My Documents directory. Delete this file if you want to revert the settings to defaults.

Editing

New scene nodes and components are created from the Create menu at the top. Their attributes can then be edited in the attribute inspector window. Note that the node transform shown is the local transform (offset from parent.)

As an alternative to using the transform gizmo, scene nodes can be moved/rotated/scaled by Ctrl + arrow keys and Page Up / Page Down. Press Ctrl+1,2,3 to change the manipulation mode, and Ctrl+4 to toggle between world relative and scene node relative movement.

To reparent scene nodes or UI elements, drag and drop them onto the new parent in the scene hierarchy window. Reparenting should retain the effective world transform, so check afterwards from the component window that the local transform is what you expect it to be. Components can not be dragged between nodes, but can be duplicated with cut/copy/paste operations.

To reorder nodes or UI elements within the same parent instead of reparenting, hold down Ctrl while dragging and dropping.

To locate a scene node from the scene, double-click it in the hierarchy window.

To create a user variable into the current node, or delete it, type the variable name into the edit field below the node attributes, and press New or Del buttons next to it. The New button will prompt to choose the variable type.

While editing, you can execute script files using the "Run script" item in the File menu. These are AngelScript files that are executed in immediate mode ie. you do not need to define a function. The editor's scene will be accessible to the script as the global property "scene."

Components of same type can be multi-edited. Where attribute values differ, the attribute field will be left blank, but editing the attribute will apply the change to all components.

In addition to whole scenes, single scene nodes including all their components and child nodes can be loaded and saved (File -> Load node, File -> Save node as.) These can act as "prefabs" for speeding up scene construction. To save a node, it needs first to be selected in the hierarchy window.

Primitive geometries (boxes, spheres, cylinders) can be instantiated from the Create menu. Note that these are just ordinary model files in the bin/Data/Models directory; their Blender format source files are in the SourceAssets directory.

Additionally a resource browser is available to access the contents of resource directories. Whenever the editor is opened or a scene is loaded the resource browser scans for resources. If at anytime the resources change the reload button can be pressed at the top-right of the resource browser and the resource browser will rescan. Two methods are provided to find resources. A tree view of the folders and a search bar. The search box utilizes a simple string substring of the filename. Resources can also be filtered by type by opening the filter panel which is toggled by the small filter icon. There are lots of contextual options for each resource type such as dragging a resource into the hierarchy view, a LineEdit, or in the viewport. A right click context menu on a resource in the browser will give additional options per resource type.

Importing

The editor can import models or scenes from all the formats that the Open Asset Import Library supports, see http://assimp.sourceforge.net/main_features_formats.html

Model and scene import work differently: model import will take everything in the source file (for example a Collada scene), and combine it into a single model, with possibly many subgeometries. Scene import on the other hand will export each source scene node separately, creating multiple models as necessary.

When a model is imported, it will also be instantiated into the scene as a new scene node with a StaticModel component.

To do the actual importing, the editor will invoke AssetImporter from the same directory where the Urho3DPlayer application was run from, so be sure both are built.

If the imported scene has no lights, a single directional light is created, so that you can at least see something.