What problem does it solve?
This Skill standardizes the creation of self-contained Script components for the Creator Hub, enabling configurable, reusable logic attached to entities and ensuring consistent lifecycle usage.
Core Features & Use Cases
- Configurable constructors: exposes public parameters in the Creator Hub UI, including mandatory public src and entity, with optional defaults and tooltips.
- Lifecycle and behavior: supports start() and update(dt) methods for per-scene initialization and frame updates.
- Inter-script communication: supports @action methods for triggers and ActionCallback parameters to wire editor actions, and provides runtime utilities to call other script instances.
- Asset referencing and runtime discovery: demonstrates referencing assets via this.src and finding child entities by name at runtime to keep scripts portable across scenes.
- Practical use cases: create reusable scripted items or custom logic attached to entities in a Creator Hub scene.
Quick Start
Create a new .tsx file that exports a class with a constructor(public src: string, public entity: Entity) and optional additional parameters, implement start() and update(dt), and attach it to an entity via the Creator Hub UI.