In the MonoBehavior workflow: If I instantiate a prefab, it’s children are cloned as well. If the prefab contains Conponents with references to those children, those references are updated to point to the new clones.
Is the same true in DOTS?
If I instantiate an entity prefab, it’s entity Children are also cloned. But: Will references to the prefab’s child entities be updated in its Components, to point to the new child clones?
Thanks for any answers.
Hi Unity devs. 
I’m wondering if you guys are thinking of having a built-in approach to this.
If not, I’m looking into writing a group of custom, post-instantiation systems to fix up Entity references like this. But it would be on a component-by-component basis. Each Component which hold references to Entity children would need a separate system to fix them up. And the reassignments would be based on looking up the Entities by their child index - maybe not the most elegant thing to do.
But perhaps this is a case where you can make a reasonable assumption about what the user wants. Maybe there’s a performant way you can automatically reassign these references, as part of your instantiation code.
Maybe something similar to how ECB handle reassignments of temporary Entity values in Components?
YES, it’s handled by LinkedEntityGroup
1 Like
Thank you both for these solutions. 