Open Asterune
ComponentDefinition

ComponentDefinition

Defines the typed fields and storage options of an ECS component.

Creatable
Instance.new("ComponentDefinition")
Inherits
LuaSourceContainerInstance
Replication
Standard

Behavior

ComponentDefinition defines the typed fields and storage options of an ECS component. Its Name identifies the component. Its Source must return one Component.define result. Definitions are evaluated in a restricted sandbox without running the place.

See Component definitions for constructors, schema options, limits, persistence, and reference policies.

Summary

Members2
Properties1
  • Source: string = ""parallel read

    The Luau source code stored by this script instance.

Methods1

Properties

Source

ComponentDefinition.Source: string = ""

The Luau source code stored by this script instance.

Methods

GetExecutionGroup

ComponentDefinition:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

Inherited members

Inherited47

LuaSourceContainer