Skip to content

@ue-too/ecs / index / ComponentPrimitiveField

介面: ComponentPrimitiveField

定義於: index.ts:179

Definition for a primitive (non-array) field in a component schema.

Extends

  • BaseComponentField

屬性

defaultValue?

optional defaultValue: unknown

定義於: index.ts:172

Default value for the field (used when creating new instances)

繼承自

BaseComponentField.defaultValue


name

name: string

定義於: index.ts:168

The name of the field

繼承自

BaseComponentField.name


optional?

optional optional: boolean

定義於: index.ts:170

Whether the field is optional (default: false)

繼承自

BaseComponentField.optional


type

type: "string" | "number" | "boolean" | "object" | "entity"

定義於: index.ts:181

Discriminator for the union type