I have a MonoBehaviour of type B, which inherits from type A. I want to add an instance of B to an entity but I need a System to retrieve those entities also by the type A.
So I tried this:
commandBuffer.AddComponent(newEntity, myInstance);
commandBuffer.AddComponent<A>(newEntity, myInstance);```
But this generates an error on play:
```SetComponentObject doesn't match the specified component type```
This sound stupid to me. Why DOTS doesn't let me add a pointer to my instance with the type I want?