Skip to main content

MetaField

Represents an entry in the meta file.

Type Parameters

Extended by

Constructors

constructor

Type Parameters

Parameters

  • name: string

    The name of this field displayed in the editor.

  • initial: TValue

    The initial value of this field.

Properties

description

public description: string = ''

initial

readonly public initial: TValue

The initial value of this field.


name

readonly public name: string

The name of this field displayed in the editor.


spacing

public spacing: boolean = false

type

readonly public type: any = undefined

The type of this field used by the editor to display the correct input.

Events

onChanged

public get onChanged(): SubscribableValueEventTValue

Triggered when the data of this field changes.


onDisabled

public get onDisabled(): SubscribableValueEventboolean

Triggered when the field becomes disabled or enabled.

Methods

clone

Create a clone of this field.


describe

Set the description of this field.

Parameters


disable

public disablevalue: boolean = true: MetaFieldTSerializedValueTValue

Disable or enable the field in the editor.

Parameters

  • value: boolean = true

    Whether the field should be disabled.


get

public get(): TValue

Get the current value.


parse

Convert a serialized value into a runtime type.

Parameters


serialize

public serialize(): TSerializedValue

Serialize the value of this field.


set

public setvalue: TSerializedValue: void

Set the current value.

Parameters


space

public spacevalue: boolean = true: MetaFieldTSerializedValueTValue

Add or remove spacing at the beginning of this field.

Parameters

  • value: boolean = true

    Whether to include the spacing.