Hi
I am having some strange issues coming from the ParentSystem while i am trying to change parents for some entities.
InvalidOperationException: Child entity not in parent
What is the best way to change the parent of an entity and remove a parent completely?
At the moment this is what i am doing
A) set Parent and PreviousParent data to PARENT B
B) Rebuild Child and LinkedEntityGroup buffers for both PARENT A and PARENT B
This is how i remove entities from a Parent
Game.Instance.EntityWorld.EntityManager.RemoveComponent<Parent>(localEntity);
Game.Instance.EntityWorld.EntityManager.RemoveComponent<LocalToParent>(localEntity);
Game.Instance.EntityWorld.EntityManager.RemoveComponent<PreviousParent>(localEntity);
Rebuild Child and LinkedEntityGroup buffers
this is where it crashes in parentsystem as well