Pickups — Editor Tools¶
Editor utilities, wizards, factories, and project settings that support authoring and debugging the Pickup System.
All editor code mirrors the runtime behaviour of world pickups (TriggerPickup + TriggerRelays + decorated PickupEffect chains) while remaining fully editor-safe.
🚀 Overview¶
This folder contains everything required to author, preview, and generate pickup prefabs and effect graphs:
- Pickup Creator Wizard – full definition → effect → prefab workflow
- Decorator tools – discovery + preview of
IPickupDecoratorCreatortypes - Prefab factories – structured, project-default-aware prefab building
- Project settings – global defaults for pickup prefab generation
All editor utilities are build-safe and guarded with #if UNITY_EDITOR && REV_PICKUPS_PRESENT.
📦 Contents¶
| Area | Types | Purpose |
|---|---|---|
| Wizards | PickupCreatorWizard, PickupCreatorView, PickupCreatorValidator, CompositePreviewUtility |
Full authoring workflow: create/edit definitions, add decorators, preview chains, build single or composite prefabs |
| Tools | PickupFactory, PickupPrefabBuilder, PickupPrefabFactory |
Programmatic prefab builders. PickupFactory + PickupPrefabBuilder are the structured paths; PickupPrefabFactory is the simple/quick helper |
| Decorator Menus | DecoratorCreatorRegistryMenu |
Warms editor type cache for IPickupDecoratorCreator discovery (used by wizards + factories) |
| Settings | RevFrameworkPickupSettings, RevFrameworkPickupSettingsProvider |
Project-wide pickup prefab defaults (dimension, colliders, rigidbodies, billboard, layer) |
🧰 Editor Architecture Notes¶
These tools align tightly with the runtime Pickup System.
1. Decorator Chains¶
- Editor builds decorated effect chains using the same contract as runtime:
IPickupDecoratorCreator - Discovery uses TypeCache (editor-only, fast).
- Runtime uses PickupEffectFactory with a pluggable registry.
- For built-in decorators, both paths produce the same wrapping structure.
- If users override the runtime decorator registry, they should also provide matching
IPickupDecoratorCreatorimplementations so editor previews remain accurate.
👉 Important:
- Decorators are applied in ascending priority
- Lower values wrap first → higher values become outermost
2. Prefab Wiring¶
All editor creation paths produce prefabs wired with:
TriggerPickup-
Appropriate trigger collider:
-
2D →
CircleCollider2D,BoxCollider2D,CapsuleCollider2D - 3D →
SphereCollider,BoxCollider,CapsuleCollider TriggerRelay2DorTriggerRelay3D- Optional
Rigidbody2D/Rigidbody - Optional
PickupBillboard - Optional layer assignment
This matches the runtime world-pickup flow exactly.
3. Project Defaults¶
RevFrameworkPickupSettings defines:
- Default dimension (2D / 3D)
- Collider shapes + sizes
- Rigidbody options
- Billboard toggle
- Layer name
PickupFactory.DefaultsFromProject() converts these into
PickupPrefabSettings used by the prefab builders.
4. Prefab Builders — When to Use Which¶
-
PickupFactory+PickupPrefabBuilderThe authoritative structured pipeline -
Saves effect graphs as assets
- Supports composite pickups
- Uses project defaults
-
Mirrors runtime shape
-
PickupPrefabFactoryA lightweight helper -
One-click prefab from definition
- No project-default pipeline
- Uses simple heuristics (e.g. sprite → 2D)
🧭 Menu Paths¶
Window / RevFramework / Pickups / Pickup Creator
RevFramework / Pickups / Reload Decorator Creators
💡 Usage Notes¶
- All scripts are wrapped in
#if UNITY_EDITOR && REV_PICKUPS_PRESENT→ no runtime overhead - Prefabs produced are runtime-ready → no hidden dependencies, no scene magic
-
Composite workflows safely generate:
-
effect graphs
- sub-assets
- prefab bindings
🧩 Recommended Workflow¶
- Create/edit definitions via the Pickup Creator Wizard
- Add decorators and preview the chain
- Build a prefab using project defaults
- Drop prefab into scene → works immediately with
TriggerPickup
🔥 What was fixed (Rab honesty pass)¶
- ❌ Removed stale
EffectPickupCorereferences - ✅ Corrected runtime alignment →
TriggerPickup - ✅ Clarified decorator wrapping behaviour
- ✅ Fixed builder hierarchy explanation
- ✅ Tightened wording to match ac