Create a chunk component
A chunk component's definition is the same as an unmanaged component. This means that you create a regular struct that inherits from IComponentData
to create a chunk component. The difference between chunk components and unmanaged components is how you add them to an entity.
The following code sample shows an unmanaged component:
public struct ExampleChunkComponent : IComponentData
{
public int Value;
}
To use the unmanaged component as a chunk component, use EntityManager.AddChunkComponentData<YourChunkComponent>(Entity)
to add it to an entity.