ComponentOptions¶
Type
ComponentOptions configures replication scope, persistence, singleton storage, custom signals, relationship behavior, and editor hints on World.DefineComponent.
Scope¶
Scope sets where component data lives and replicates: "Replicated" saves on the server and replicates to clients, "Server" stays on the server, and "Client" stays local to each client.
Saved¶
Saved controls whether instances of the component serialize into the place file.
Singleton¶
Singleton stores one world-wide instance of the component accessed through World instead of per-entity attachment.
Signals¶
Signals maps signal names to ordered arrays of Field.Arg descriptors, creating a DeclaredSignal member on the returned component handle for each entry.
PlayerList¶
PlayerList: (boolean | { Label: string?, Column: number?, Sort: ("Ascending" | "Descending")?, Hidden: boolean?, [string]: never })?
PlayerList displays a numeric or string component field as a column in the player list, accepting true or a table with Label, Column, Sort, and Hidden.
Exclusive¶
Exclusive restricts a relationship component so each source entity holds at most one target at a time.
OnDeleteTarget¶
OnDeleteTarget controls what happens when a relationship target is destroyed: "Remove" detaches the pair and "Delete" destroys the source entity as well.
Hints¶
Hints maps field names to editor metadata tables (Min, Max, Step, Tooltip).