Component Registration
Component Registration, this is how you register and change components in arch.
Register
// Problematic managed struct
public record struct Inventory(List<Item> Items);
// Register, 8 = Size in bytes of the managed struct.
var componentType = new ComponentType(ComponentRegistry.Size-1, 8);
ComponentRegistry.Add(typeof(Inventory), componentType);ComponentRegistry.Add<Inventory>();ArrayRegistry.Add<Inventory>();Acess
Compile-Time static
Last updated