Skip to content

API Function field

github-actions[bot] edited this page Nov 28, 2026 · 6 revisions

Function: field()

function field(type, options?): (_value, context) => void;

Defined in: src/engine/core/registry.ts:294

Field decorator: declare a serializable field and its type (and, for netcode, how it replicates).

Parameters

type

FieldType

options?

FieldOptions

Returns

(_value, context) => void

Clone this wiki locally