📊 Economy — Sample Scenes¶
The Economy Samples folder contains runnable scenes that demonstrate how the Economy system behaves using real service flows.
These scenes are designed to:
- Validate behaviour
- Demonstrate integration patterns
- Provide copyable usage examples
They are not production systems and can be safely removed from builds.
📂 Folder Layout¶
Samples/
Economy/
00_Economy_Quickstart/ // Currency-only (IValueLedger via EconomyBootstrap)
01_Economy_OverlayScene/ // Lightweight runtime overlay
🎬 Scene Samples¶
| Scene | Demonstrates | Notes |
|---|---|---|
| 00_Economy_Quickstart | Currency-only flows via IValueLedger |
No inventory (IItemStore is null) |
| 02_Economy_OverlayScene | Minimal runtime overlay using public APIs | No teaching UI |
▶️ Usage¶
Open any scene from:
Assets/RevFramework/Systems/Economy/Samples/Scenes/
Each scene is:
- Self-contained
- Focused on a single scenario
- Designed to be run in Play Mode
Typical setup:
- Services composed via EconomyBootstrap
ICurrencyServiceis requiredIInventoryServiceis optional (depending on scene)- Lightweight UI (teachable panel or overlay)
🧠 Teachable Panels¶
💡 Teachable Panels
Teachable panels are provided as debug and learning tools.
- They are safe to run at runtime (no UnityEditor dependencies)
- They interact only through the public API
- They can be used in your own scenes for debugging, inspection, and validation
However:
- They are not designed for shipping builds
- They are not optimised UI
- They are not a supported gameplay layer
Think of them as:
👉 Hostile-consumer debug tools that prove the API works
Use them to:
- Inspect behaviour
- Validate integrations
- Debug complex setups
For production:
- Build your own UI
- Wire your own gameplay logic
🧠 What These Samples Show¶
-
How Economy composes behaviour using:
-
IValueLedger(money) IItemStore(items)- Service layer (
Shop,Craft,Reward) - How to call Economy operations correctly using public abstractions
- How preflight behaves vs authoritative execution
-
How rollback behaves per operation:
-
Buy / Sell / Craft → rollback supported
- Reward → partial completion (money may remain applied)
- How to validate behaviour without building gameplay systems
⚠️ Important Notes¶
- These scenes use real runtime behaviour, not simplified demos
- UI is for demonstration only and is not part of the runtime system
- Some scenes require additional SKUs (e.g. Inventory)
- Teachables and diagnostics live in separate teaching scenes
- Samples are intentionally lightweight and prioritise clarity over robustness
🌐 Authority Notes¶
The Economy system does not provide multiplayer or authority handling.
It does not:
- enforce server authority
- prevent client-side execution
- handle networking, replication, or validation
Instead, Economy is built to plug into your authority model.
All money operations flow through:
Economy → IValueLedger → ICurrencyService
This means:
- Economy will only be as authoritative as your
ICurrencyService - If your currency service is permissive, Economy will be permissive
- If your currency service is server-authoritative, Economy will respect that
👉 We provide the integration points — you provide the authority.
For multiplayer setups:
- Run Economy operations from your server or authoritative layer
- Use your networking solution (Mirror, NGO, Photon, custom) to control execution
Economy will not do this for you — by design.
🔗 Related Documentation¶
- Economy — Abstractions
- Economy — Services
- Currency — Ledgers & Policies
- Inventory — Item Stores (optional integration)
- Teachable Panels — guided diagnostics and learning scenes
These samples are runnable references of actual behaviour.
Use them to learn, validate, and copy patterns — then replace them with your own gameplay systems.