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
- When — trigger (
PrimaryInteract,DragStarted,PlacedInSpot, …) - If (optional) — blackboard condition
- 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
- Logic Window → create SceneLogic if needed
- Select furniture → Spots → create spots (move spots to real drop positions)
- Select same objects → Batch Add for pickup / interact rules
- Manage → wire each On Trigger (sound, VFX, SetActive, …)
- Scene → All Spots Filled → Manage → wire
SceneLogic.LoadSceneByName
Example: place correctly → play sound
- Create a Placement Spot, assign required object, set radius
- Central rule on that object: When =
PlacedInSpot, assign spot - On Trigger →
AudioSource.PlayOneShot(or Play)
Example: pickup → effect
- When =
DragStarted - On Trigger → instantiate VFX / enable particle system / your script
Example: all placed → next scene
- Spots for each object
- Scene rule When =
AllSpotsFilled - On Trigger →
SceneLogic.LoadSceneByNamewith 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
IInteractableper object (ObjectLogicvsUnityEventInteractable). Placed= valid drop.PlacedInSpot= object is inside its spot radius.- Spots only track their Required Object.
- Placeables notify
SceneLogiceven withoutObjectLogicfor drag/placement rules. Interact rules still needObjectLogic(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.