Scripting API
Scripting API
ComponentTraits
Enum in Abyss.Core, from Abyss.Core.
What a component is, in the three respects a caller has to know before touching it.
public enum ComponentTraits : uintRemarks
World.TraitsOf reports it. The bits are the engine's COMPONENT_IS_* constants and cross unchanged.
Values
| Name | Value | Description |
|---|---|---|
None | 0 | None of the below — or the id names nothing. |
Rust | 1 | The component has a Rust type: the engine's, Bevy's or a plugin's. |
PlainData | 2 | A value of it can be made from bytes: zeroed at a spawn, carried by a command buffer, or written as a whole row through Chunk.GetSpan. |
Engine | 4 | One of the components the engine declares itself. |
Computed | 8 | Bevy or a plugin works it out for itself; it is not a person's to set. |
CanBeAdded | 16 | It can be put on an entity with a starting value, through World.AddComponent. |
Partial | 32 | Its layout and its enums leave part of it out — a list, a handle, a string, an enum that can hold an entity — so reading and writing its fields and choices reaches only the rest. |
SerializesAllFields | 64 | A scene writes every field of it, even one a load would give the same value: its Rust type is marked #[reflect(SerializeAllFields)]. |
List | 128 | A list declared with AbyssListAttribute: each entity's holds as many items as it needs, read and written through World.ReadList and its kind, never as the component's bytes. |
