Play around with entities 0.2.0-preview.18, ConvertToEntity’s Convert And Inject GameObject is not working now, Gameobjects are always destroyed
For those that don’t want to read through everything of the link posted above (as most of it is not relevant for this specific problem) here’s what they say there:
This is indeed a bug, and not working normally.
However, there is a workaround. Since the bug only seems to happen with root object, and we can use that fact to work around the problem:
- Create a new root object with a “Convert to Entity” component set to “Convert and Destroy”
- Add your current object (with their “Convert to Entity” set to “Convert and Inject”) as children to this root object
Voila, it should work again then.
In your Hierarchy it will look something like:
![]()
Where player used to be just a root object, but now is a child of this new parent object. I named it specifically like that so I know it’s there for a workaround.
This new parent object is very simple:

The player looks like this:

When going into play mode the parent object will be destroyed, but the children will then become root objects. And everything should work like before. I haven’t tested this a lot yet, but at first glance it seems to work.
Thank you
Thanks for reporting the issue, the regression has been fixed in the upcoming package update.
It’s fixed in Entities 0.3.0 package