Skip to main content

Vector2MetaField

class Vector2MetaField extends MetaFieldPossibleVector2Vector2

Represents a two-dimensional vector stored in a meta file.

Constructors​

constructor​

public new Vector2MetaFieldname: stringinitial: Vector2: Vector2MetaField

Parameters

  • name: string

    The name of this field displayed in the editor.

  • initial: Vector2

    The initial value of this field.

Inherited from MetaField.constructor

Properties​

description​

public description: string = ''
Inherited from MetaField.description

initial​

readonly public initial: Vector2

The initial value of this field.

Inherited from MetaField.initial

name​

readonly public name: string

The name of this field displayed in the editor.

Inherited from MetaField.name

spacing​

public spacing: boolean = false
Inherited from MetaField.spacing

type​

readonly public type: symbol = Vector2.symbol

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 from MetaField.onChanged

onDisabled​

public get onDisabled(): SubscribableValueEventboolean

Triggered when the field becomes disabled or enabled.

Inherited from MetaField.onDisabled

Methods​

clone​

public clone(): Vector2MetaField

Create a clone of this field.

Inherited from MetaField.clone

describe​

public describedescription: string: Vector2MetaField

Set the description of this field.

Parameters

Inherited from MetaField.describe

disable​

public disablevalue: boolean = true: Vector2MetaField

Disable or enable the field in the editor.

Parameters

  • value: boolean = true

    Whether the field should be disabled.

Inherited from MetaField.disable

get​

public get(): Vector2

Get the current value.

Inherited from MetaField.get

parse​

public override parsevalue: PossibleVector2number: Vector2

Convert a serialized value into a runtime type.

Parameters

Overwrites MetaField.parse

serialize​

public override serialize(): PossibleVector2number

Serialize the value of this field.

Overwrites MetaField.serialize

set​

public setvalue: PossibleVector2number: void

Set the current value.

Parameters

Inherited from MetaField.set

space​

public spacevalue: boolean = true: Vector2MetaField

Add or remove spacing at the beginning of this field.

Parameters

  • value: boolean = true

    Whether to include the spacing.

Inherited from MetaField.space