Skip to content

Components and properties

Components are reusable behavior blocks attached to objects. They are similar to Unity components: an object can carry many components, each component has fields, and those fields can drive runtime behavior and flow graph nodes.

When to use a component

Use a component when the object needs durable behavior or structured state.

NeedComponent-shaped solution
Object can take damageHealth
Object participates in physicsRigid Body 2D and Collider 2D
Object belongs to a teamTeam
Object stores itemsInventory
Object can be tapped or draggedInteractable, Draggable, Drop Zone
Object acts on a cooldownAbility Cooldown
Object is a sticky projectileProjectile (+ dynamic Rigid Body 2D + Collider 2D)

Use Object Flow for event wiring. Use components for reusable state and capabilities.

Adding a component

  1. Select an object in Arrange.
  2. Open the Components card in the inspector.
  3. Click Add Component.
  4. Choose a built-in or project component.
  5. Configure its fields.

Some components add dependencies automatically. For example, adding a Health Bar can also require Health, because the bar needs a value to display.

Component fields

Component fields are typed values.

TypeExample
NumberMax HP, speed, cooldown, amount
BoolEnabled, starts active, is sensor
TextLabel, tag, event name
ChoiceBody type, shape type, easing mode
Object or asset referenceTarget, prefab, sound, animation clip

Fields can be edited in the inspector, read by flow graphs, and used by component actions.

Components and Object Flow

Attached components extend the flow node catalog for that object.

Component featureFlow result
ActionA node that performs work, such as health.damage
ConditionA branch node, such as health.isAlive
EventA trigger, such as health changed or item picked up
FieldData available to expressions or field nodes

Prefer component actions over duplicate graph logic. If Health already knows how to apply damage, use the Health action instead of manually subtracting from a variable.

Built-in components

Common built-ins include:

ComponentUse
InteractableModern tap/click interaction (prefer over legacy Tappable)
Draggable / Drop ZoneDrag-and-drop interactions
Motion / Sprite Renderer / Sprite AnimatorTweens, drawing, frame sequences
Health / Stats / Team / Health BarCombat state and display
Inventory / PickupStored items and collectibles
Platformer / Top-Down / Side-Scroller ControllerPlayer movement
Spawner / Timer / Hazard / ProjectileWaves, clocks, damage zones, sticky shots
Collider 2D / Rigid Body 2D / Joint 2D / RagdollPhysics
Scene CameraPlay viewport camera

See Built-in reference for the full catalog.

Project components

The Components workspace lets you create project-specific components without leaving the editor.

A project component can define:

  • Fields
  • Events
  • Actions
  • Conditions
  • Visual action steps
  • Optional script bodies

Use project components when a behavior appears on several objects and should be maintained in one place.

Inspector properties vs component fields

Object inspector properties describe the object itself: transform, name, art, visibility, interaction, and prefab sync.

Component fields describe one behavior attached to the object: Health HP, Collider shape, Spawner prefab, Inventory capacity, and so on.

Keep data where it belongs. A score value belongs in GameState; a door's target scene belongs on the door object or its component; an enemy's HP belongs in Health.

Opal Engine — MIT licensed