KROYSDOCS
HomeWhat's newv0.1.0
MANUAL / Editor / Scene and entities

Scene and entities

A scene is a tree of entities; an entity is a name, a transform and the components that give it behaviour. The Viewport, World and Inspector panels edit them.

PanelsViewport, World, Inspector, Lighting
UndoEvery edit
01

Entities and components

Everything in a scene is an entity with a transform. Components add behaviour and data: a Mesh Renderer draws a mesh, a Rigid Body and a Collider make it physical, a Character Controller makes it walk, a Scripts component runs C# scripts. Entities nest: a child moves with its parent.

Create entities with Edit › Create Empty Entity (Ctrl+Shift+E), by dropping assets into the scene (Placing assets) or from scripts at run time.

02

The Viewport

The Viewport shows the scene from the editor camera.

  • Click an entity to select it; Ctrl-click adds to the selection.
  • The transform tools in the toolbar move, rotate and scale the selection; turn on Snapping for fixed steps.
  • Hold the right mouse button and use WASD, Q and E to fly; the mouse wheel zooms; Frame Selected (F) centres the selection.
  • View switches between lit (PBR) and solid shading, shows the grid and the UI over the viewport.

The camera only reacts while the mouse is over the Viewport, so scrolling a panel that floats over it never moves the camera.

03

The World panel

The World panel lists the scene's entities as a tree. Drag an entity onto another to make it a child; drag to empty space to make it a root. Filter chips (Renderables, Lights, Physics, Audio, UI, Gameplay) and the search field narrow long scenes. The eye icon hides an entity in the editor only.

Rename with F2, duplicate with Ctrl+D, delete with Del. Expand All and Collapse All are in the panel's menu.

04

The Inspector

The Inspector shows every component of the selected entity, with a section each. Values change with drags, typing or pickers; asset fields take drops from the Content panel. Add Component at the bottom lists every component, plugin components included. With several entities selected, the Inspector edits them together and marks values that differ.

Selecting an asset in the Content panel shows its settings instead: import options of a model, a texture's encoding, a material's surface values.

Mirror a transformTransform › Mirror X/Y/Z flips an object around its local axis with a signed scale; click again to restore it.
05

Lighting

The Lighting panel holds the scene's environment: the environment map and its intensity, atmospheric fog, bloom, exposure and tone mapping (ACES, Reinhard), and the post-processing passes. Lights themselves are components (Directional, Point and Spot Light) on entities.

06

Prefabs

A prefab (.kprefab) is a saved entity tree you can place many times. Instances keep a link to their prefab, so changing the prefab changes every instance. Scripts create instances with Scene.Instantiate("Prefabs/Crate.kprefab") (Scene).

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.