Skip to main content

Overview

The component schematic scaffolds a new ECS component class for a NanoForge client or server part. The generated file includes the component class, a default export required for code generation, and an EDITOR_COMPONENT_MANIFEST required for the NanoForge editor to display and configure the component.

Usage

Options

Generated file

{directory}/{name}.component.ts

Editor manifest

The EDITOR_COMPONENT_MANIFEST export is required for the NanoForge editor to discover the component, render its configuration panel, and generate code. Each params entry describes one constructor parameter:

Examples

Generate a PlayerComponent for the client:
Generate a JavaScript server component: