Updating Entity MonoBehaviour proxy via CopyTransformToGameObjectProxy acting eradicly in subscene

I’m using Unity.Entities version 0.8.0 because 0.9.0 breaks DOTS Editor 0.4.0, this might be fixed in 0.9.0. Unity Editor version is 2020.1.0b5

I have a subscene, and in it I have object that I would like to be tracked via MonoBehaviour script. On object itself, I have Data Components like so:

I’ve added ConvertToEntity even though It’s in the subscene (hence the message at the top) because I wanted to set Convert and Inject option. When I click Play, I get two of them, but they act completely different. It’s a ball, and it rolls down the slope, but they roll completely different, it looks like they are using different physics systems although they show the same data components. I get feedback in the Inspector for one of them so I can see which one of them is supposed to be proxy. Now to make things even more strange, if I try to disable GameObject itself or any script besides Physics related, during Play mode, another ball snaps for the moment on it and then continues to act as it was, affected by different physics. The one that snaps is supposed to be Entity, this is strange since it should be another way around, proxy should follow entity. And even doesn’t make the difference if I enable or disable object/script, it always snaps and continues.

NOTE: If I move object outside of subscene, to the root scene, they become synced. At least it looks like there is one ball and I also get transform feedback in Inspector.

I would like to hear your theories on this :slight_smile: I’ll find a way to solve it, but I would like to know problem behind this.

I’m willing to upload video if you’d like.

Regards,
Danilo

Hm, I think I concluded one problem, which is why they behave differently. If it’s in the subscene, Physics Body of original and proxy collide, thus generating different initial impulse. What I don’t understand is why we don’t have that behavior when ball is in scene root.

Maybe the problem lays behind this statement from Unity manual: