Overview
Scene Instructions allow you to override asset-based instruction lists with scene-based components that can reference GameObjects directly. This is essential for actions that need to interact with specific scene objects.
Why Scene Instructions?
❌ Asset-Based Limitation
ScriptableObject instructions cannot reference scene GameObjects - they exist at the project level.
✅ Scene-Based Solution
RelationshipInstructions component lives in the scene and can reference any GameObject.
Setup
- Add Instruction Manager
Ensure
Relationship Instruction Managerexists in scene (usually on same GameObject as RelationshipManager) - Create Instructions GameObject
Create empty GameObject → Add
Relationship Instructionscomponent - Configure Override
Set the RelationshipDefinition and Level to override
- Add Instructions
Add GC2 instructions that reference scene GameObjects
GameObject References
Scene Instructions can reference any GameObject or component in the scene:
Common References
- Doors to open/close
- NPCs to spawn/despawn
- UI elements to show/hide
- Triggers to enable/disable
- Audio sources to play
GC2 Integration
- Characters to teleport
- Markers to navigate to
- Actions to execute
- Cutscenes to play
- Dialogue to start
Example
Open the Blacksmith's secret workshop when player reaches "Trusted" level:
RelationshipInstructions (Scene Component)
├─ Definition: Merchant Reputation
├─ Level Name: "Trusted"
├─ Override OnEnter: ✓
└─ OnEnter Instructions:
├─ Open Door: [Workshop Door] ← Scene reference!
├─ Enable GameObject: [Secret Anvil]
├─ Play Sound: welcome_trusted.wav
└─ Show UI Message: "The blacksmith trusts you now."
RelationshipInstructions (Scene Component)
├─ Definition: Merchant Reputation
├─ Level Name: "Trusted"
├─ Override OnExit: ✓
└─ OnExit Instructions:
├─ Close Door: [Workshop Door]
└─ Disable GameObject: [Secret Anvil]