What Am I Doing Wrong? Adding ConvertToEntity to a Cube and Disappearing upon Start.

Package List:
5383758--545553--upload_2020-1-18_6-14-7.png

I start up a brand new, fresh project.

Spawn in a cube.

Rotate the camera a bit to get the cube in view.

Add ConvertToEntity to the cube.

Cube disappears.

Check Entity Debugger. Cube entity created. Cube position and size transfers correctly.

Cube not there.

Where did cube go?

Please help. I’ve been trying to get the cube to show up for a couple hours now. My brain is fried.

Edit: Removed Unity Physics. Cube is still gone. Why cube do you forsaken me?

2 Likes

add the Hybrid Renderer package

3 Likes

Cameras dont work without Hybrid Renderer package. Geeeee Unity. Where was that in the documentation?

Oh wait, there just isnt any documentation. Just the forums.

Thanks man. That was a really simple fix and should be noted in bold letters somewhere in the package description.

“Download these other packages to make your DOTS project function.”

In the converttoentity component, make sure you do “convert and inject” instead of “convert and destroy”.
But if you move the underlying entity, your cube won’t move with it, so you might also want to use CopyTransformToGameObject component as well, so you can sync up the Translation/Rotation of the entity to the Transform of the original GameObject

1 Like

To be fair the Entities package deal with only data and your cube did become data… what to do with the data is up to you. It is just that Hybrid Renderer could render this data.

You can use Entities for just data transformation so thats why renderer is not a dependency of Entities package.

8 Likes

Same issue here.

Why would you keep the game object here? This would introduce no performance gain, as you compute not only the ECS data now, but also have to move the data onto every gameobject by the sync adding more cache misses… am I right?

Is added and configured like in several tutorials: