The scene editor is the most important editor and is used to create scenes/levels/maps. GUI's are also handled in the scene editor which will be explained later. Below is a screenshot of the scene editor. Specifically, it is a screenshot of the main editor with a scene asset open and active.
The two main parts of the scene editor are the viewport and the properties panel on the right. There is currently only a single viewport (no orthograpic top/side/front views). The panel on the right has several tabs which will be explained later.
To build a scene, you place scene nodes into the scene and then attach components to those scene noes to define their behaviour and appearance.
To add a scene node:
Use Delete to delete selected scene nodes.
To add a component, select the scene node and hit the "New Component" button in the Properties panel (right-hand side). Below is a quick reference on the different engine-defined prefabs:
Model | Give the scene node a model/mesh |
Ambient Light | Have the scene node cast an ambient light |
Directional Light | Have the scene node cast a directional light |
Point Light | Have the scene node cast a point light |
Dynamics | Have the scene node interact with physics (both dynamic and static) |
Proximity | Have the scene node be able to detect when other scene nodes enter it's proximity |
Script | Give the scene node the ability to execute scripts in response to events posted by the engine |
Camera | Allow the scene node to be used as a camera |
Particle System | Give the scene node a particle system |
When a component is added to a scene node, a properties group box will be added to the scene node's properties panel. It should be simple enough to understand the meaning of the properties of a component.
The scene editor also supports prefabs which are basically just templates to make reusability easier. A dedicated section for prefabs can be found further down on this page.
Use the Hierarchy panel (right-side panel) to modify the parent/child relationship of scene nodes. Use drag-and-drop and the right-click context menu.
There is currently only a single viewport (no orthograpic top/side/front views). Below is a quick reference on the controls:
LMB + Move Up/Down | Move camera forward/backward |
LMB + Move Left/Right | Turn camera left/right |
RMB + Move | Turn camera |
LMB + RMB + Move | Pan camera |
LMB (No Move) | Select |
RMB (No Move) | Context Menu |
To move, rotate or scale a scene node you need to use the transformation handles that show when the scene node is selected. You can switch between translate, rotate and scale modes and also global and local modes.
T, R, S | Translate, Rotate, Scale transform modes, respectively |
G, L | Global, Local transform modes, respectively |
Q | Toggle between Global and Local transform modes |
CTRL | Snap while translating (no current support for snapping rotation and scale) |
The Viewport menu on the toolbar can be used to control some properites of the viewport.
The right-side panel is where various properties are modified.
The Properties tab is where the properties of the selected scene node are viewed and modified. Unfortunately there is not currently support for viewing/modifying common properties of multiple scene nodes at a time.
The Hierarchy tab is where the parent/child relationships of scene nodes are handled. It also allows you to do miscellaneous stuff such as selecting and deleting scene nodes. There is not currently any search functionality here, but it is planed for the future.
Scene nodes that are linked to a prefab will be highlighted blue in the hierarchy panel. You can unlink a scene node from a prefab from the hierarchy by right-clicking on the scene node and selecting "Unlink from Prefab".
The Scene Properties tab is where various properties of the scene itself can be modified. This is currently very bare bones and only includes a few properties. Currently, you can only modify the name (not the file name) and a very limited number of rendering properties.
A prefab can be thought of as the definition of a scene node to use when creating and updating scene nodes. When a scene node is linked to a prefab, it will be updated when the prefab is updated.
Prefabs are created from a source scene node. The definition of a prefab is stored in a file which can be reused across multiple scenes. A prefab can only be created and updated via a scene editor.
To create a prefab, first create a new prefab file by right-clicking on a folder in the asset explorer and choosing "New Prefab". Do not include the .gtprefab extension when specifying the file name. After the file is created, you drag the source scene node from the Hierarchy panel onto the prefab file in the asset explorer. This will automatically link the source node to the newly update prefab.
To instantiate a prefab, you simple drag it from the asset explorer into the scene. This will place it just in front of the camera. Watch out for perspective illusions - it often feels like a scene node can appear closer or further away than it actually is.
Modifying a linked scene node will not automatically update the prefab file. To do so, either drag-and-drop the scene node from the hierarchy panel onto the prefab file in the same way as creating the prefab. An alternative is to use the "Update" button in the Details group box of the scene nodes properties.
When a prefab is updated, all scene nodes that are linked to it will be updated also.