📦 Inventory Samples — Demo Assets & Integrations¶
The Inventory Samples folder contains optional demo assets and small example scripts for exploring the Inventory system.
These are intended for:
- Learning
- Debugging
- Prototyping
👉 They are not part of the runtime framework and are safe to remove.
📂 Folder Layout¶
Samples/
Effects/ // Example IUseEffect assets
ScriptableObjects/ // Sample items, filters, policies
Prefabs/ // Minimal gameplay prefabs (e.g. pickups)
DemoHelpers/ // Small sample gameplay + editor utilities
Diagnostics/ // Performance smoke tests (dev-only)
🎬 Sample Contents¶
Effects/¶
Example IUseEffect implementations used by items.
| Asset | Demonstrates |
|---|---|
DebugPingEffect |
Simple debug/log effect |
SpawnVfxEffect |
Spawning visual effects on use |
ScriptableObjects/¶
Sample authoring data used to drive the system.
| Subfolder | Purpose |
|---|---|
Inventory/ |
Example ItemDefinition assets |
Filters/ |
Equipment slot filtering rules |
Policies/ |
Container sizing via ContainerSizePolicy |
Effects/ |
Reusable use-effect assets |
Prefabs/¶
Minimal gameplay examples.
| Prefab | Purpose |
|---|---|
WorldItemToInventory2D |
Basic pickup → inventory flow |
👉 These are example gameplay scripts, not framework features.
Scripts/¶
Small utilities and sample patterns.
| Script | Purpose |
|---|---|
KnownItemsList |
Defines item → constant mappings |
KnownItemsGenerator |
Generates GUID constants as C# code |
👉 These demonstrate useful workflows, not required systems.
Diagnostics/¶
Developer-only performance smoke tests.
| Script | Purpose |
|---|---|
InventoryPerfSmoke |
Stresses core inventory operations under load |
InventorySnapshotPerfSmoke |
Stresses snapshot capture and restore workflows |
👉 These scripts are for profiling and validation only — not gameplay features.
🚀 Quick Start¶
- Open a sample scene (see
Scenes/) - Use the Teachable Panels to interact with the system
- Modify items, filters, or effects to experiment
👉 No UI setup required — teachables handle interaction
🔐 Authority (Important)¶
Inventory is permissive by default:
- If no
IInventoryAuthorityis resolved → mutations are allowed - This supports single-player and sample workflows
Some samples include InventoryAuthorityBinder to demonstrate where authority would be enforced.
👉 This does not mean the system is fail-closed
For multiplayer:
- enforce authority in your own systems
- validate via server / host
- integrate with your networking layer
⚠️ Notes¶
- Sample assets use demo GUIDs — create your own for production
- All examples use public APIs only
- No internal access or hidden behaviour
- Diagnostics scripts are not benchmarks, only smoke tests
- Safe to delete once understood
🧠 Design Notes¶
These samples are intentionally:
- Minimal
- Transparent
- Copyable
They demonstrate:
👉 how to use the system, not how to build a game
📎 Related¶
- Inventory Runtime → core system logic
- Inventory Scenes → guided examples
- Inventory Teachables → interactive learning panels