🎁 Pickups — Core¶
Folder: Runtime/Systems/Pickups/Core
This folder contains the runtime foundation of the pickup effect pipeline.
It defines:
- the base effect type
- the standard gated execution path
- context-aware dispatch
- effect construction from definitions
- the in-memory cooldown store
🎯 Purpose¶
The Core folder owns how pickup effects are executed and constructed.
It is responsible for:
- defining the standard
PickupEffectapply pipeline - enforcing null-damageable and cooldown rules on that path
- dispatching between standard and context-aware execution
- building decorated effect chains from definitions
- storing per-session cooldown entries
This folder does not include:
- trigger or interactable scene behaviour
- authority resolution
- feedback systems
- concrete effect implementations
- decorator implementations
- networking or replication
📦 Folder Overview¶
This folder provides:
- the base effect execution pipeline
- the effect runner and dispatch logic
- factory-based effect construction
- session-scoped cooldown storage
🧩 What Lives Here¶
PickupEffect→ base effect typePickupEffectRunner→ execution dispatcherPickupEffectFactory→ definition-to-effect constructionPickupEffectStaticCooldowns→ cooldown storage
🧠 Usage Guidance¶
Standard Execution Path¶
PickupEffect.ApplyTo(IDamageable, GameObject)
- applies built-in gating
- enforces null-damageable rules
- handles cooldown checks and updates
This is the default path for most effects.
Context-Aware Execution¶
IPickupEffectWithContext.ApplyTo(...)
- dispatched directly by the runner
- does not apply base gating automatically
Use this only when you need explicit control over execution behaviour.
Effect Construction¶
PickupEffectFactory builds effects from definitions.
Construction flow:
- create core effect from the definition
- read decorator entries
- ignore null entries
- sort by ascending priority
- resolve decorator creators
- wrap the effect in order
- return the outermost effect
Notes:
- lower priority wraps first
- higher priority becomes outermost
- missing creators are skipped
- creation errors do not stop remaining decorators
Cooldown Storage¶
PickupEffectStaticCooldowns stores cooldowns per session.
- keyed by owner instance and effect
- entries are not persisted
- expired entries are removed during lookup
- null owners are ignored
This is a support type for the effect pipeline, not a general-purpose cooldown system.
🧪 Diagnostics¶
Typical execution flow:
Caller invokes Apply
↓
PickupEffectRunner
↓
Context-aware check
↓
Standard path or context-aware path
↓
Cooldown + validation (standard path only)
↓
OnApply execution
⚠️ Important Notes¶
- Standard execution includes base gating and cooldown handling
- Context-aware execution does not include base gating automatically
- Context-aware implementations must handle validation and cooldowns explicitly
- Cooldowns are scoped to the resolved owner object
🚫 Not for Production Use¶
This folder does not provide:
- scene interaction logic
- authority enforcement
- networking or replication
It defines the execution pipeline only.
🔗 Related Documentation¶
- Abstractions
- Definitions
- Decorators
- Effects
- UnityIntegration
- Authority