Parent, LocalToParent, LocalToWorld and Translation problem...

It looks like I’m still getting the same problems I had prior to 0.2.0.

Two problems:
1.
If I have an Entity that only has a LocalToWorld component, and add and set its Parent like so:

CommandBuffer.AddComponent(index, entity, new Parent {Value = newParent});
CommandBuffer.AddComponent<LocalToParent>(index, entity);

The entity now has a parent, but its LocalToWorld component is reset to 0,0,0. My assumption would be that the entity would retain its current LocalToWorld, but LTW and LTP are now zeroed out so the Entity teleports to origin upon assigning a Parent.

If I modify the Parent of an Entity its current Parent is automatically copied to PreviousParent as expected.
However I get the following error every single time:

I can get around it by increasing the size of the hashmap for UniqueParents in Unitys code, but obviously that keeps getting overwritten and I don’t want to fork it to fix this.

Is it because I’m doing it wrong? How am I supposed to do this?

I have the same problem. On adding LocalToParent using CommandBuffer, the rotation is suddenly changed. The parenting itself works though.

Anything we can do here?

Does anybody have an answer to this?

When parenting my entities using a command buffer, they jump to a different position. The parent-child relationship works, but I obviously don’t want them to jump. I want them to keep their current world position (and rotation) when they get parented. How is this handled in ECS?