Crafting โ DemoHooks (Samples)¶
This subfolder contains sample-only hook components used by Crafting demo scenes.
๐ฏ Purpose¶
These scripts exist to:
- Wire demo scenes together (simple input, logging, and debug hooks)
- Demonstrate basic integration patterns such as:
- Subscribing to
CraftingServiceevents - Implementing
ICraftingValidator - Providing data via
ICraftingLevelSource - Show minimal, copyable examples of interacting with the Crafting system
They are intentionally small and focused so you can see where to plug in your own systems.
โ ๏ธ Important¶
These scripts are not part of the supported Crafting API.
They are:
- sample code only
- not required to use the Crafting system
- not supported as extension points
- not covered by API stability guarantees
They may be simplified, incomplete, or intentionally naive.
โ What These Are NOT¶
These scripts are not:
- production-ready systems
- recommended gameplay architecture
- full implementations of UI, progression, or persistence
- a reference for error handling, validation flows, or UX design
They intentionally do NOT demonstrate:
- preflight-driven UI flows
- full user-facing feedback systems
- save/load or persistence
- multiplayer or authority handling
๐ง What They Actually Demonstrate¶
Each component focuses on a single concept:
- HUD/controller examples โ calling the service and handling events
- validators โ implementing
ICraftingValidator - data providers โ implementing simple interfaces like
ICraftingLevelSource - event sinks โ reacting to service events (e.g., XP, completion, failure)
They are examples of where integration happens, not how your full system should be built.
๐งช Using These Samples¶
You can:
- Use them as reference examples
- Copy small pieces into your own code
- Use them to understand where to hook into Crafting
๐๏ธ Production Guidance¶
For real projects:
๐ Implement your own runtime components using the public Crafting API
๐ Replace these with your own UI, progression, and gameplay systems
๐ Treat these scripts as learning scaffolding, not reusable building blocks
๐ Relationship to Crafting¶
- Crafting defines the service + interfaces
- Your project defines the runtime behaviour
- These samples demonstrate basic integration points only