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 (EffectPickupCore + TriggerRelays + decorated PickupEffect graphs) 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 end-to-end definition → effect → prefab pipeline
- 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 and 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. PickupPrefabBuilder is the authoritative structured path; 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, prompt billboard, layer). |
🧰 Editor Architecture Notes¶
These tools align tightly with the runtime Pickup System:
1. Decorator Chains¶
- Editor builds decorated effect graphs using the same contract as runtime:
IPickupDecoratorCreator - Discovery uses TypeCache (fast editor-only).
- Runtime uses PickupEffectFactory with a pluggable registry.
- For built-in decorators, both paths produce identical chains.
- If users plug in custom decorator registries at runtime, they should also ship matching
IPickupDecoratorCreatortypes so editor previews remain accurate.
2. Prefab Wiring¶
All factories (wizard, tools, quick helper) wire prefabs with:
EffectPickupCore- Correct trigger colliders (
CircleCollider2D,SphereCollider, etc.) TriggerRelay2D/TriggerRelay3D- Optional
Rigidbody2D/Rigidbody - Optional
PickupPromptBillboard - Layer assignment via project defaults
This wiring matches the runtime world-pickup flow exactly.
3. Project Defaults¶
RevFrameworkPickupSettings defines:
- Default dimension (2D/3D)
- Collider shapes + radii/sizes
- Rigidbody toggles
- Billboard toggles
- Layer name
PickupFactory.DefaultsFromProject() maps these directly into runtime-friendly PickupPrefabSettings.
4. Two Prefab Builders — When to Use Which¶
-
PickupPrefabBuilder
The authoritative, structured pipeline used by the wizard.
Mirrors runtime shape and uses project settings. -
PickupPrefabFactory
A lightweight menu helper for fast “create prefab from definition.”
🧭 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
→ Editor-safe, build-safe, no runtime payload. - Factories produce runtime-compatible prefabs: no scene magic, no hidden singletons.
- Composite tools support multi-effect assets and generate sub-asset chains safely.
🧩 Recommended Workflow¶
- Create/edit definitions via the Pickup Creator Wizard
- Add decorators and preview the chain in editor
- Build a prefab (2D or 3D) using project-wide defaults
- Drop prefab into world → it works immediately with
EffectPickupCore