EnumMetaField
Represents an enum value stored in a meta file.
Type Parameters
Constructors
constructor
public override new EnumMetaFieldTname: stringoptions: MetaOptionT[]initial: T = ...: EnumMetaFieldT
Type Parameters
Parameters
OverwritesMetaField.constructorProperties
description
public description: string = ''
MetaField.descriptioninitial
The initial value of this field.
Inherited fromMetaField.initialname
readonly public name: string
The name of this field displayed in the editor.
Inherited fromMetaField.nameoptions
readonly public options: MetaOptionT[]
spacing
public spacing: boolean = false
MetaField.spacingtype
readonly public type: symbol = EnumMetaField.symbol
The type of this field used by the editor to display the correct input.
symbol
Events
onChanged
public get onChanged(): SubscribableValueEventTValue
Triggered when the data of this field changes.
Inherited fromMetaField.onChangedonDisabled
public get onDisabled(): SubscribableValueEventboolean
Triggered when the field becomes disabled or enabled.
Inherited fromMetaField.onDisabledMethods
clone
public clone(): EnumMetaFieldT
Create a clone of this field.
Inherited fromMetaField.clonedescribe
public describedescription: string: EnumMetaFieldT
Set the description of this field.
Parameters
description: stringThe description.
MetaField.describedisable
public disablevalue: boolean = true: EnumMetaFieldT
Disable or enable the field in the editor.
Parameters
value: boolean = trueWhether the field should be disabled.
MetaField.disableget
public get(): T
Get the current value.
Inherited fromMetaField.getgetOption
public getOptionvalue: T: MetaOptionT
Parameters
parse
Convert a serialized value into a runtime type.
Parameters
OverwritesMetaField.parseserialize
public serialize(): T
Serialize the value of this field.
Inherited fromMetaField.serializeset
Set the current value.
Parameters
OverwritesMetaField.setspace
public spacevalue: boolean = true: EnumMetaFieldT
Add or remove spacing at the beginning of this field.
Parameters
value: boolean = trueWhether to include the spacing.
MetaField.space