While upgrading, I got this error while playing the project:
ArgumentException: Unknown Type:CommonEcs.CollectSharedComponentsSystem1+Collected[CommonEcs.SpriteLayer]` All ComponentType must be known at compile time. For generic components, each concrete type must be registered with [RegisterGenericComponentType].
I don’t know how to use it. It says it can only be used in Assembly declarations. I tried setting as specified here but it doesn’t work. Can somebody show code on how use this?
Oh I see your generics are on the system and not on the component. That shouldn’t even require you to declare the generics.
What is the definition for CollectSharedComponentsSystem<> and SpriteLayer?
public abstract class CollectSharedComponentsSystem<T> : ComponentSystem where T : struct, ISharedComponentData {
...
}
public struct SpriteLayer : ISharedComponentData, IEquatable<SpriteLayer> {
...
}
That doesn’t require you to register generics. It must be something else that you are not showing.
By looking at the error more carefully it points otherwise. It says that there is a component Collected and that is what must be registered.