Class ComponentInfo¶
Namespace: Apogee.Reflection
Assembly: Apogee.Reflection.dll
An ECS component: its memory layout, so that the ECS can register it and scripts can read and write it.
public sealed class ComponentInfo
Inheritance¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
ComponentInfo(string, Type?, int, int, IReadOnlyList<FieldDef>, string?)¶
public ComponentInfo(string name, Type? clrType, int size, int alignment, IReadOnlyList<FieldDef> fields, string? doc = null)
Parameters¶
name string
clrType Type?
size int
alignment int
fields IReadOnlyList<FieldDef>
doc string?
Properties¶
Alignment¶
public int Alignment { get; }
Property Value¶
ClrType¶
The struct, or null for a component a script defined.
public Type? ClrType { get; }
Property Value¶
Type?
Doc¶
public string? Doc { get; }
Property Value¶
Fields¶
public IReadOnlyList<FieldDef> Fields { get; }
Property Value¶
IsTag¶
public bool IsTag { get; }
Property Value¶
Name¶
The script name: the C# name, in PascalCase as ECS component names are.
public string Name { get; }
Property Value¶
Size¶
Zero for a tag.
public int Size { get; }
Property Value¶
Methods¶
FindField(string)¶
public FieldDef? FindField(string name)
Parameters¶
name string