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
The Luau source code stored by this script instance.
Methods1
Returns this instance if it is an ExecutionGroup.
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
Instance47
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying