StringMetaField
Represents a string stored in a meta file.
Type Parameters
T extends string = string
Constructors
constructor
Type Parameters
T extends string = string
Parameters
name: string
The name of this field displayed in the editor.
initial: T
The initial value of this field.
MetaField.constructor
Properties
description
public description: string = ''
MetaField.description
initial
The initial value of this field.
Inherited fromMetaField.initial
name
readonly public name: string
The name of this field displayed in the editor.
Inherited fromMetaField.name
spacing
public spacing: boolean = false
MetaField.spacing
type
readonly public type: StringConstructor = String
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.
Inherited fromMetaField.onChanged
onDisabled
public get onDisabled(): SubscribableValueEventboolean
Triggered when the field becomes disabled or enabled.
Inherited fromMetaField.onDisabled
Methods
clone
public clone(): StringMetaFieldT
Create a clone of this field.
Inherited fromMetaField.clone
describe
public describedescription: string: StringMetaFieldT
Set the description of this field.
Parameters
description: string
The description.
MetaField.describe
disable
public disablevalue: boolean = true: StringMetaFieldT
Disable or enable the field in the editor.
Parameters
value: boolean = true
Whether the field should be disabled.
MetaField.disable
get
public get(): T
Get the current value.
Inherited fromMetaField.get
getPresets
public getPresets(): MetaOptionT[]
parse
Convert a serialized value into a runtime type.
Parameters
Inherited fromMetaField.parse
serialize
public serialize(): T
Serialize the value of this field.
Inherited fromMetaField.serialize
set
Set the current value.
Parameters
Inherited fromMetaField.set
setPresets
public setPresetsoptions: MetaOptionT[]: StringMetaFieldT
Parameters
space
public spacevalue: boolean = true: StringMetaFieldT
Add or remove spacing at the beginning of this field.
Parameters
value: boolean = true
Whether to include the spacing.
MetaField.space