Scripting API
Scripting API
ComponentType<T>
Struct in Abyss.Core, from Abyss.Core.
A component type registered with a World, carrying the CLR type it maps to.
public readonly struct ComponentType<T> where T : unmanagedRemarks
The type parameter is what lets Chunk.GetSpan hand back a typed span without the caller restating the element type, and what lets the query validate that a column really does hold T-sized elements.
Type parameters
T: The plain-data struct this component stores.
Properties
Id
public ComponentId Id { get; }The native component id.
Size
public static int Size { get; }Size of one element in bytes.
Methods
Read
public QueryTerm Read()A query term that reads this component.
Write
public QueryTerm Write()A query term that reads and writes this component.
With
public QueryFilter With()A filter requiring entities to have this component, without selecting it.
Without
public QueryFilter Without()A filter requiring entities not to have this component.
Operators
implicit operator ComponentId
public static implicit operator ComponentId(ComponentType<T> type)Allows a typed component to be used wherever an untyped id is expected.
Parameters
type
