reeseschultz / ReeseUnityDemos

Unity packages and demos—emphasizing ECS, jobs and the Burst compiler—by Reese and others.
https://reese.codes
MIT License
516 stars 45 forks source link

Investigate authoring of components attached to children #60

Closed reeseschultz closed 3 years ago

reeseschultz commented 3 years ago

Possibly good news. I distinctly recall GameObject-to-entity conversion not recursively applying authoring components attached to children (when using the ConvertToEntity script, not talking about subscenes), which is why I've had to opt for hacks to re-parent them after conversion. If it has in fact worked like that this entire time, then I have no idea how I would have missed this. Regardless, in a private project (same versions as everything in this project) I'm observing that recursive application of child authoring components occurs during conversion.

Most immediately that means possible improvements to the organization of the GameObjects in the Stranded demo, along with removal of some hacky components.

Further out, this means I may be able to use conversion much more idiomatically, which is great for me and anyone trying to understand the demos.

reeseschultz commented 3 years ago

Never mind, the components of children do in fact get converted properly, but the parent-child relationship is absent. Will stick with the hacks.