📦 Inventory — Editor Tools¶
Editor extensions that support the Inventory System with professional-grade asset management, debugging, and creation workflows.
🧰 Overview¶
The Inventory editor tools provide:
- Custom inspectors for managing item data and services
- Runtime debugging tools for inspecting containers and operations in Play Mode
- Context menu utilities for quick scene setup
These tools are designed to support the public Inventory API, allowing developers to inspect, test, and validate behaviour without relying on internal implementation details.
📑 Contents¶
| Category | Tools Included | Description |
|---|---|---|
| Inspectors | ItemDatabaseEditor, SceneInventoryServiceEditor, InventoryAuthorityBinderEditor |
Enhanced inspectors for asset management, runtime access, and authority configuration. |
| Windows | InventoryDebuggerWindow |
Play-mode debugger for inspecting containers, running operations, and viewing live deltas. |
| Menus | SceneInventoryServiceContextMenu |
Adds quick creation of SceneInventoryService under GameObject/RevFramework. |
| Compiler Guards | Debugger stub | Safe fallback when REV_INVENTORY_PRESENT is not defined. |
🗂️ ItemDatabaseEditor¶
A full management interface for the ItemDatabase asset.
Key Features¶
- Search by name or category
- Group items by category
- Sort A→Z or Z→A
- Inline editing of category and rarity
- Ping asset and Copy GUID actions
- Drag-and-drop ItemDefinition support
- Project scan to auto-add all ItemDefinitions (with GUID assignment)
- Rebuild runtime category/tag caches
- Bulk tools:
- Per-row selection via checkboxes
- Select All / Select Visible / Clear Selection
- Apply category to selected items (Undo supported)
- Selected item count display
This transforms a raw ScriptableObject list into a scalable production-ready item pipeline.
🪛 SceneInventoryServiceEditor¶
Enhances the default inspector for SceneInventoryService with:
- Quick access to the Inventory Debugger
- Play-mode-only runtime tools
- Safe fallback behaviour when not in Play Mode
This inspector acts as a gateway into runtime inspection, rather than duplicating debugger functionality.
🔐 InventoryAuthorityBinderEditor¶
Custom inspector for InventoryAuthorityBinder.
Purpose¶
- Clearly explains how inventory authority works
- Provides a baseline implementation for local/single-player setups
Behaviour¶
- Always True → mutations allowed
- Always False → mutations return
NoAuthority - No binder present → mutations allowed (default behaviour)
This inspector exists primarily as a teaching and reference tool.
🕵️ InventoryDebuggerWindow¶
A runtime debugging tool for inspecting inventory behaviour through the public service API.
Features¶
- Select service, owner, and container
- Live delta stream via
SceneInventoryService.OnContainerChanged - Slot viewer with index labels and optional rarity pills
- Sorting using real
InventorySortSpec - Search using the runtime search strategy
- Resize containers with truncate reporting
- Split tools:
- Split half
- Split custom amount
- Auto placement (
-1) - Action log with scrollback
- Auto-find service support
- Safe handling of multiple owners and container updates
Design Notes¶
- All operations route through
SceneInventoryService - Authority checks are respected
- No direct access to internal container implementation
- Reflects actual runtime behaviour (not simulated logic)
📋 Menu Paths¶
-
Debugger
Window / RevFramework / Inventory / Debugger -
Create SceneInventoryService
GameObject / RevFramework / Create SceneInventoryService
🔐 Compiler Safety¶
All editor tools are wrapped in:
```csharp