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/
DemoHelpers/ // Small sample gameplay + editor utilities
Diagnostics/ // Performance smoke tests (dev-only)
Effects/ // Example IUseEffect assets
Materials/ // Materials used by Inventory sample prefabs/models
Models/ // Models used by Inventory sample prefabs
Prefabs/ // Inventory-owned demo prefabs
Scenes/ // Guided Inventory demo scenes
ScriptableObjects/ // Sample items, filters, policies
Textures/ // Textures used by Inventory sample assets
Sample Asset Ownership¶
Inventory sample assets are intentionally kept inside the Inventory sample folder when they are part of the Inventory demo dependency chain.
This includes:
- prefabs with Inventory scripts attached
- models used by Inventory prefabs
- materials/textures required by those models
- ScriptableObject assets used by Inventory teachables or scenes
This keeps SKU/package boundaries clean and prevents unrelated packages from importing assets that reference Inventory-only scripts.
👉 Shared assets are reserved for genuinely neutral content that does not serialize references to Inventory-specific scripts.
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/¶
Inventory-owned demo prefabs used by scenes and teachable panels.
| Prefab | Purpose |
|---|---|
WorldItemToInventory2D | Basic pickup → inventory flow |
Some prefabs may reference Inventory scripts, sample models, materials, or ScriptableObject data.
👉 These prefabs are sample/demo assets, not runtime framework requirements.
Models/¶
Models used by Inventory sample prefabs and scenes.
These are kept with Inventory samples when Unity treats them as part of the prefab dependency chain.
Materials/¶
Materials used by Inventory sample models and prefabs.
Textures/¶
Textures used by Inventory sample materials and demo visuals.
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