Repository navigation
API Function field
github-actions[bot] edited this page Dec 2, 2026
·
6 revisions
function field(type, options?): {
(_value, context): void;
<This, V>(value, context): ClassAccessorDecoratorResult<This, V>;
};Defined in: src/engine/core/registry.ts:313
Field decorator: declare a serializable field and its type (and, for netcode, how it replicates). On an auto-accessor
(@field(Number) accessor gap = 0, ADR 0667) the field is the same to scenes, the inspector and scripts, and a write
that changes it calls the component's _fieldChanged(name, before, after) when it has one.
{
(_value, context): void;
<This, V>(value, context): ClassAccessorDecoratorResult<This, V>;
}
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference