I have the following requirement:
- From a single baker (and accompanying Authoring script) create an additional sibling entity in addition to the primary entity.
- The additional entity should not be a child of the primary, nor should it be directly related to it.
The obvious initial approach was to use CreateAdditionalEntity(), however this violates requirement (2) as there is no option to create sibling entities.
Next I tried creating the additional entity with the bakingOnlyEntity option set to true, and then in a baking system create a new entity and copy relevant components to it.
However it is not possible to create new entities that end up in the baked scene, which makes no sense.
Finally I tried to remove the parent/child relationship of the two entities in the custom baking system, i.e. remove the child from the primary entity’s LinkedEntityGroup.
This fails as well, this time because the primary is a ghost prefab and the ghost collection is apparently built prior to the baking systems running, so it complains that there is a mismatch, since it expects one more child than the prefab now has:
The ghost DruidRoot expects 2 child entities but 1 are present.
The ghost collection contains a ghost which does not have a valid prefab on the client! Ghost: ‘DruidRoot’ (‘’).
Manually searching for this hash inside in-proc ‘ServerWorld’ and FOUND ghost Entity(5641:1) ‘’ (‘DruidRoot’)! Ensure this Ghost is registered on the client before the server syncs its prefab list!
So the question is; how do I achieve this very simple requirement?