🎁 Pickups — Definitions¶
Folder: Runtime/Systems/Pickups/Definitions
This folder contains the authoring layer for pickups.
Definitions are ScriptableObject assets that describe:
- which core effect to create
- which decorators should wrap it
- configuration data for those decorators
They are data-only and do not execute gameplay logic.
🎯 Purpose¶
The Definitions layer separates authoring data from runtime logic.
It is responsible for:
- providing input to
PickupEffectFactory - enabling configuration without code changes
- defining decorator composition and ordering
Definitions do not:
- execute effects
- contain gameplay logic
- interact with scene objects directly
📦 Folder Overview¶
This folder provides:
- ScriptableObject-based effect definitions
- decorator configuration and ordering
- data used to construct runtime effects
🧩 What Lives Here¶
PickupEffectDefinitionBase→ base definition type- concrete definition assets for built-in effects
🧠 Usage Guidance¶
Creating a Definition¶
Definitions derive from PickupEffectDefinitionBase.
public abstract PickupEffect CreateCoreEffect();
Implementations should:
- create the core
PickupEffect - apply definition data
- return the configured instance
Decorators defined on the asset are applied automatically by the factory.
Decorator Configuration¶
public List<DecoratorDefinition> decorators;
Each entry specifies:
- decorator type
- priority
Ordering:
- lower priority → inner
- higher priority → outer
Data Fields¶
Definitions may include:
- display and tooling data (name, sprite)
- decorator configuration values (audio, VFX, conditions)
- editor-only fields used by tooling
These fields are not enforced by the runtime pipeline.
🧪 Diagnostics¶
Runtime construction flow:
Definition selected
↓
PickupEffectFactory.BuildEffect
↓
CreateCoreEffect
↓
Decorator sorting and wrapping
↓
Composed PickupEffect returned
Definitions are not used after construction.
⚠️ Important Notes¶
- definitions are data-only and do not execute logic
- decorator fields may include values not used by built-in implementations
- runtime behaviour depends on effect and decorator implementations
🚫 Not for Production Use¶
This folder does not provide:
- runtime gameplay execution
- effect logic
- scene interaction behaviour
It defines authoring data only.
🔗 Related Documentation¶
- Core
- Decorators
- Decorators/Creators
- Effects