Skip to content

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 CraftingService events
  • 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