RevFramework — Inventory, Pickups & Crafting¶
Teachable Panels¶
Teachable Panels turn the Inventory, Pickups and Crafting systems into living documentation you interact with directly inside the Unity Editor.
They let you drive the real runtime APIs — SceneInventoryService, the pickup effect apply path, and CraftingService — without writing UI, wiring events, or building custom debug scenes.
They are the actual runtime systems, running live in your scene
They are:
- Not simulations
- Not mockups
- Not demo-only logic
Important — Read This First¶
Teachable Panels are development and learning tools.
They are not shipping UI
If a Teachable Panel component is present on a GameObject in a shipped scene, it will be visible and interactive at runtime.
Shipping with Teachable Panels attached is a developer error, not a framework bug.
Before building your game:
- Remove Teaching panels from scenes, or
- Ensure
REV_TEACHABLESis not enabled
Why These Panels Exist¶
Item systems fail in quiet ways.
A craft that is valid as a recipe still fails because a container has no space. An equip silently does nothing because a slot filter rejected the item. A pickup applies twice. None of that is obvious from reading logs.
Teachable Panels provide:
- A safe, visual, real-time debugger
- A fast way to learn the API by doing
- Clear result-first reasoning (why an operation was refused, not just that it was)
- A way to validate behaviour before writing gameplay UI
- A powerful onboarding tool for teams
Open the scene → press Play → press buttons → watch the system respond instantly.
Inventory Panels Included¶
Quickstart — Minimal Inventory¶
Samples/Systems/Inventory/Scenes/00_Quickstart_Minimal
The first-time path through the service seam:
- Real flow: UI input →
SceneInventoryService→ result-first feedback - Honest read/write operations through the public service seam
- Copy-pasteable
Give,Peek,RemoveandClearpatterns - Adapter-based and dependency-safe throughout
Items & Stacks¶
Samples/Systems/Inventory/Scenes/01_Items_And_Stacks
Practical stack interactions, the ones drag-and-drop UI actually needs:
- Select a slot, then click another to merge-then-swap
- Split with an explicit amount and target
- Quick-split into auto-placement via right-click
- Mutation always routed through the service, never direct container edits
Slots & Restrictions¶
Samples/Systems/Inventory/Scenes/02_Slots_And_Restrictions
The backpack-to-equipment flow, made explicit:
- Strict per-slot filter checks
- Quantity of exactly 1 on equipment slots
- Acceptance tested with pure read checks first, so nothing changes while you probe
- Equip / unequip semantics you can copy directly
Search & Sort¶
Samples/Systems/Inventory/Scenes/03_Search_And_Sort
Discovery tools driven through the service rather than reimplemented client-side:
- Stable, empty-last sorting via
InventorySortSpec - Text search through the service seam
- Seed / Sort / Search sections that stand alone and lift out cleanly
Snapshots — Save & Load¶
Samples/Systems/Inventory/Scenes/04_Snapshots
A real persistence loop for inventory and optional equipment:
- Input → JSON capture → file write/read → apply
- Missing-item policy made explicit, with no silent magic
- Separate Seed, Options, Save/Load and File Tools sections
Pickups Panels Included¶
Quickstart — Pickups¶
Samples/Systems/Pickups/Scenes/00_Quickstart_Pickups
The apply path end to end:
- Inspect live bindings and run preflight before applying
- Compare the standard dispatch path against the context dispatch path
- See how a null target is handled, and when apply is blocked outright
Decorators & Apply Path¶
Samples/Systems/Pickups/Scenes/01_Decorators_+_Cooldowns
- Shows the live decorator chain for an effect
- Applies that effect through the supported runtime path, not a shortcut
- Makes cooldown behaviour visible as part of the chain
World Pickups & Interactables¶
Integrations/Pickups/InventoryIntegration/Scenes/02_World_Pickups_+_Interactables
Cross-system scene — requires Inventory.
- Real world pickups through
TriggerPickup - Runtime selectors and scene trigger consumption
- Selector UI works in builds: no
UnityEditorAPI anywhere in the panel
Crafting Panels Included¶
Quickstart — Crafting¶
Samples/Systems/Crafting/Scenes/00_Crafting_Quickstart
Organised around the first-time learning path:
- Overview — what is wired, resolved and discovered
- Seed — create valid input state through supported adapters
- Preflight — why a craft can or cannot run before a job exists
- Jobs — live jobs, progress, pause / resume / cancel
This panel deliberately behaves as a hostile consumer: it only touches the public API surface.
Workbench Basics (2D or 3D)¶
Samples/Systems/Crafting/Scenes/01_Workbench_Basics_2D_or_3D
Bench-driven crafting as three separate decision layers:
- Bench gate — can this bench attempt this recipe here?
- Service gate — can
CraftingServiceactually run it now? - Runtime state — did a job get created, progress, complete, or fail?
That separation is the point: being near a bench does not mean the craft is valid. Works with either CraftingWorkbench2D or CraftingWorkbench3D.
Routing, Space & Currency¶
Samples/Systems/Crafting/Scenes/02_Routing_Space_Currency
Three reasons a craft can be a valid recipe and still fail in practice:
- Routing — where do outputs try to go?
- Space — can those containers actually accept the outputs?
- Currency — can the owner afford the cost right now?
Note: this panel uses TeachingOutputRouter, a teachables-only helper, to make the routing seam visible. The router preview is educational, not a production recommendation.
Validators & Modifiers¶
Samples/Systems/Crafting/Scenes/03_Validators_And_Modifiers
The validator/modifier seams as a loop:
- Discover — validators and modifiers found on the owner or parent chain
- Toggle — enable/disable MonoBehaviour seams without touching internals
- Diagnose — re-run preflight and
Probefor the live context - Act — enqueue and surface the real rejection or failure reason
Offline Progress & Persistence¶
Samples/Systems/Crafting/Scenes/04_Offline_Progress_Persistence
Offline progress as four separate steps:
- Inspect live jobs queued or running for this owner
- Save snapshots through
CraftingServicepublic APIs - Age the snapshot by shifting
acceptedAtUtcbackward to simulate time away - Restore through the API and let the service decide resume, completion or failure
The mental model matters here: offline progress is not a magic save system.
Real Adapters with Inventory & Currency¶
Integrations/Crafting/InventoryIntegration/Scenes/05_Adapters_InventoryCurrency
Cross-system scene — requires Inventory and Currency.
The final integration loop, with no fake adapters:
- Bind real adapters — inventory and currency adapters assigned on
CraftingService - Mutate real state — add/remove items and credit currency through those adapters
- Diagnose —
CanCraftDetailedandProbeagainst live adapter state - Enqueue real jobs — the service consumes, credits and refunds through real integrations
- Observe — progress, cancellation and failure straight from the service
Why These Teachables Matter¶
They dramatically reduce:
- Onboarding time
- Guesswork and trial/error
- UI-driven debugging
- Integration mistakes
- Support questions
And dramatically increase:
- Developer understanding
- Debugging clarity
- Confidence in item, pickup and crafting behaviour
- Safe prototyping
- Team knowledge sharing
They are a major reason RevFramework is a developer-first asset.
How to Use¶
- Open the scene listed under the panel you want, from
Samples/Systems/<System>/Scenes/ - Press Play — the panel is already in the scene and its overlay draws itself
- Drive the system live: give items, equip, trigger pickups, enqueue crafts
- Observe real results and the reasoning behind each refusal
- Copy the same API calls into your gameplay code
There is no menu to open a panel from
The panels are scene components, not editor windows.
To retune a panel, select its GameObject in the Hierarchy and edit it in the Inspector. To put a panel in a scene of your own, add the panel component to a GameObject.
Summary¶
The Inventory, Pickups & Crafting Teachable Panels give you:
- Live debugging
- Real API behaviour
- Clear reasoning for every refusal
- Full visibility into stacking, slot rules, apply paths and craft preflight
They are not demos. They are not toys.
They are the fastest, safest way to master RevFramework’s item architecture.