Skip to content

Simple Logic (A → B)

General trigger system. When something happens → fire a UnityEvent. You wire the rest (audio, VFX, scenes, custom scripts) like any other UnityEvent.

Rules live in one place: SceneLogic. Day-to-day editing is in the Logic Window — you do not need to open every prop’s component list.

Pieces

Piece Role
SceneLogic One per scene. Central object bindings, scene rules, blackboard, named events, spots list.
ObjectLogic Thin per-object hook for interact/drag. No rules to manage here (legacy local list migrates automatically).
PlacementSpot Correct drop position for a required object.

DecoratingEventRelay stays for toolkit UI/feedback. This layer is for gameplay reactions.


How a rule works

  1. When — trigger (PrimaryInteract, DragStarted, PlacedInSpot, …)
  2. If (optional) — blackboard condition
  3. On Trigger — UnityEvent (wire anything)

Logic Window (preferred)

Tools → DecoratingToolkit → Logic Window
(also still listed as Logic Wizard in some menus)

Tab What it does
Manage List/edit all object bindings + scene rules on SceneLogic. Expand a binding → set When / conditions → wire On Trigger.
Batch Add Multi-select props → add the same rule to each (stored centrally).
Spots Multi-select → create placement spots; optional PlacedInSpot rule.
Scene Create SceneLogic, quick-add All Spots Filled / Event / BoolIs rules.

Opening Manage also migrates any leftover rules from old ObjectLogic components into SceneLogic.

Typical artist path

  1. Logic Window → create SceneLogic if needed
  2. Select furniture → Spots → create spots (move spots to real drop positions)
  3. Select same objects → Batch Add for pickup / interact rules
  4. Manage → wire each On Trigger (sound, VFX, SetActive, …)
  5. Scene → All Spots Filled → Manage → wire SceneLogic.LoadSceneByName

Example: place correctly → play sound

  1. Create a Placement Spot, assign required object, set radius
  2. Central rule on that object: When = PlacedInSpot, assign spot
  3. On TriggerAudioSource.PlayOneShot (or Play)

Example: pickup → effect

  1. When = DragStarted
  2. On Trigger → instantiate VFX / enable particle system / your script

Example: all placed → next scene

  1. Spots for each object
  2. Scene rule When = AllSpotsFilled
  3. On TriggerSceneLogic.LoadSceneByName with your scene name

Triggers

Object: PrimaryInteract, SecondaryInteract, DragStarted, DragStopped, Placed, PlacedInSpot, Event

Scene: Event, AllSpotsFilled, BoolIs

SceneLogic helpers (for UnityEvent)

Method Use
Raise(string) Broadcast a named event
SetBoolTrue / SetBoolFalse Blackboard flags
Increment Blackboard int +1
LoadSceneByName Load a scene

Optional conditions: BoolIs, IntAtLeast on the blackboard.


Notes

  • Prefer one IInteractable per object (ObjectLogic vs UnityEventInteractable).
  • Placed = valid drop. PlacedInSpot = object is inside its spot radius.
  • Spots only track their Required Object.
  • Placeables notify SceneLogic even without ObjectLogic for drag/placement rules. Interact rules still need ObjectLogic (the window adds it when you create bindings).
  • Keep editing in the Logic Window so you never dig through a long stack of components on each prop.