Overview
This page provides a complete reference for all components and ScriptableObjects in the World Activity System. Use this as your API documentation when building activities and events.
Note: All components integrate seamlessly with Game Creator 2 visual scripting. No C# coding required for basic usage.
WorldActivityManager
MonoBehaviourCentral singleton that manages all activities, events, and player state.
Inspector Properties
| Property | Type | Description |
|---|---|---|
| Time Provider Type | TimeProviderType | How time is measured (GameTime, RealTime, CozyWeather, Custom) |
| Player Tag | string | Tag used to identify player GameObject (default: "Player") |
| Use Camera Fallback | bool | Use Camera.main if no player tag found |
| Proximity Checks Per Second | int | Frequency of proximity checks (default: 10) |
| Max Proximity Check Distance | float | Maximum distance to check for activities (default: 200) |
| Debug Logging | bool | Enable console debug logs |
| Show Proximity Gizmos | bool | Draw gizmos in Scene view |
Public Methods
DiscoverActivity(WorldActivity activity, bool executeCallbacks)Marks an activity as discovered. Optionally executes OnActivate callbacks.
CompleteActivity(WorldActivity activity, bool autoDiscover, bool executeCallbacks)Marks an activity as completed. Can auto-discover if not yet discovered.
IsActivityDiscovered(WorldActivity activity) → boolReturns true if activity has been discovered.
IsActivityCompleted(WorldActivity activity) → boolReturns true if activity has been completed.
TriggerEvent(TemporalActivity event) → boolAttempts to trigger an event. Returns true if successful.
EndEvent(TemporalActivity event)Ends an active event immediately, executing completion callbacks.
IsEventActive(TemporalActivity event) → boolReturns true if event is currently running.
SpatialActivity
ScriptableObjectDefines a discoverable encounter in the world with fixed location.
Create: Right-click in Project → Create → World Activity System → Spatial Activity
Properties
| Property | Type | Description |
|---|---|---|
| Display Name | string | Name shown to players |
| Description | string | Optional description for UI/journals |
| Icon | Sprite | Visual representation |
| Category | ActivityCategory | Type of encounter (see categories below) |
| Requires Discovery | bool | Must be discovered before interacting |
| Is Repeatable | bool | Can be completed multiple times |
| Trigger Object | GameObject | Scene GameObject with SpatialActivityAnchor |
| Prerequisites | ConditionList | GC2 conditions required for discovery |
| On Activate | InstructionList | GC2 instructions executed when discovered |
| On Complete | InstructionList | GC2 instructions executed when completed |
| Show On Map | bool | Display on map once discovered |
| Map Icon | Sprite | Optional different icon for map |
| Reveal Radius | float | Map fog-of-war reveal distance |
Activity Categories
TemporalActivity
ScriptableObjectDefines a time-based or conditional event that can be automated.
Create: Right-click in Project → Create → World Activity System → Temporal Activity
Properties
| Property | Type | Description |
|---|---|---|
| Display Name | string | Name shown to players |
| Description | string | Optional description |
| Icon | Sprite | Visual representation |
| Trigger Type | EventTriggerType | When event triggers (see types below) |
| Conditional Behavior | ConditionalBehavior | OneShot or Temporal (for Conditional type) |
| Event Duration | float | How long event lasts (seconds) |
| Event Priority | float | Queue priority (0.0-1.0, higher = first) |
| Cooldown Seconds | float | Time before re-trigger allowed |
| Is Global Event | bool | Affects entire world |
| Incompatible Events | List<TemporalActivity> | Events that cant run together |
| Spawned Encounters | List<GameObject> | Anchors activated during event |
| Chained Event | TemporalActivity | Event triggered when this ends |
| Prerequisites | ConditionList | GC2 conditions required |
| On Activate | InstructionList | GC2 instructions when event starts |
| On Complete | InstructionList | GC2 instructions when event ends |
| On Event End | InstructionList | Additional instructions on end |
Event Trigger Types
Interval
Triggers at fixed time intervals (e.g., every 10 minutes).
Additional Properties: Interval (seconds), Start Delay, Max Occurrences
TimeOfDay
Triggers at specific times: Dawn, Noon, Dusk, or Midnight.
Additional Properties: Time of Day, Days Between, Max Occurrences
Conditional
Triggers when custom GC2 conditions are met.
Conditional Behavior: OneShot (triggers once, then disables) or Temporal (can trigger multiple times)
Manual
Only triggered via GC2 Instruction or code.
Use case: Story-driven events, boss fights, scripted sequences
EventScheduler
MonoBehaviourAutomated scheduling system for temporal events. Created automatically by WorldActivityManager.
| Property | Type | Description |
|---|---|---|
| Scheduler Enabled | bool | Enable/disable automatic scheduling |
| Enable Event History | bool | Log all event activity for debugging |
| Dawn Time | float | Hour for dawn events (default: 6.0) |
| Noon Time | float | Hour for noon events (default: 12.0) |
| Dusk Time | float | Hour for dusk events (default: 18.0) |
| Midnight Time | float | Hour for midnight events (default: 0.0) |
| Check Interval | float | Frequency for conditional checks (default: 1.0s) |
| Debug Logging | bool | Enable detailed scheduler logs |
Performance: EventScheduler uses smart caching for conditional events, achieving 80-95% cache hit rate. See Debug Window → Performance tab.
SpatialActivityAnchor
MonoBehaviourScene component that links a SpatialActivity to a world position with trigger collider.
| Property | Type | Description |
|---|---|---|
| Activity | SpatialActivity | Reference to SpatialActivity asset |
Setup Requirements
- Must have a Collider component (Sphere/Box/Capsule)
- Collider must have
Is Triggerchecked - GameObject must be active in scene
- Activity reference must be assigned
Custom Inspector Features
- Shows linked activity name (read-only)
- "Edit Activity Asset" button for quick access
- Automatic validation warnings
- Auto-fix buttons for common issues