Skip to content

Objects and hierarchy

Objects are the building blocks of a scene. A player sprite, floor tile, button, invisible trigger, camera, group, and UI label are all objects. The hierarchy shows how those objects are organized and how parent transforms affect children.

Object basics

Every object has:

AreaPurpose
TransformPosition, size, rotation, scale, opacity, and flip state
NameThe label shown in hierarchy, inspectors, graphs, and debug tools
Art or roleImage, group, UI element, camera, empty helper, or runtime marker
Interaction settingsWhether input events can target the object
ComponentsOptional behavior modules such as Health or Collider 2D
VariablesOptional object-scoped fields
Flow graphsOptional Object Flow rules

Name important objects early. Graphs and debugging become much easier when objects are called Player, DoorExit, CoinCounter, or EnemySpawner instead of Sprite 12.

Selecting objects

In the Arrange workspace:

GestureResult
Click on the stageSelect the top object under the pointer
Drag empty stageBox-select every object the rubber-band touches
Shift+drag empty stageAdd box-select hits to the current multi-selection
Click in hierarchySelect the row's object
Ctrl/Cmd+clickAdd or remove from multi-selection
Shift+click objectRange-select along the hierarchy order
Click the scene rootInspect scene-level settings
EscCancel a gesture or clear a focused edit mode

If an object is hard to select on the stage, select it from the hierarchy. This is common for invisible triggers, small colliders, background art, and deeply nested children.

Parenting and groups

Parenting lets one object carry other objects with it. Move the parent and the children follow.

Common uses:

PatternExample
Character groupBody, weapon, shadow, hitbox
UI groupPanel, label, icon, button
Level chunkPlatform, hazard, pickups
Spawn templateEmpty parent with child sprites and logic

Drag objects in the hierarchy to reorder or reparent them. A child keeps its local transform relative to the parent.

Tip: Use empty groups to organize complex scenes. Empty parents are also useful anchor points for spawn positions, camera targets, and visual effects.

Transform editing

The inspector and stage gizmo both edit transforms.

FieldNotes
X / YPosition on the scene canvas
Width / heightSprite or object bounds
RotationDegrees around the object's pivot
ScaleRelative size multiplier
OpacityVisibility intensity
FlipMirror art without changing the source asset

Use inspector fields when you need exact values. Use the stage handles for fast layout.

Layering and draw order

Objects draw according to hierarchy and scene ordering. When objects overlap, reorder them in the hierarchy. For characters and props that must paint as one unit, attach a Sorting Group to the parent and use each Sprite Renderer's render order inside that group.

General rules:

  • Put backgrounds near the bottom of the scene tree.
  • Put gameplay objects above backgrounds.
  • Put UI in the UI workspace (screen space), not as ad-hoc stage sprites, when it should stay readable across sizes.
  • Group related visuals under a Sorting Group so their order stays stable.

Inspector workflow

The inspector is where object behavior gets specific.

Inspector cardCommon work
TransformPlace and size the object
ObjectRename, choose art, toggle visibility and interaction
ComponentsAdd or configure behaviors
VariablesDefine object-local values
Motion / SkeletonJump to animation setup
Prefab actionsSave, update, or revert reusable templates

With multiple objects selected, shared fields can be edited together. Mixed values indicate that selected objects currently differ.

Prefabs and reusable objects

A prefab is a reusable object template. It can include:

  • Child hierarchy
  • Art assignments
  • Components and fields
  • Object variables
  • Object Flow graphs
  • Motion and skeleton data

Use prefabs for enemies, pickups, projectiles, UI widgets, doors, hazards, and repeated level pieces. Save a configured object as a prefab from the inspector, then place it again from the asset library.

See Prefabs for the deeper reference.

Good hierarchy habits

  1. Keep important objects named.
  2. Group repeated structures before saving prefabs.
  3. Avoid putting global game rules on random scene objects; use Scene Flow instead.
  4. Keep invisible triggers named by purpose, such as FallZone or ShopEnterArea.
  5. Put debug-only objects in a clearly named group so they are easy to remove before publishing.

Opal Engine — MIT licensed