When I use the ECS system, I encountered a problem that is how to convert from gameobject to Entity?

If I use GameObject I can write like this :
GameObject gameObject = hitinfo.collider.gameObject;

//after some operation …

then I can write this to get parent object from the “GameObject”, i.e. :
MyObject = gameObject.GetComponentInParent();

Now I wanna use ECS, so how can I solve this dependency relationships? If ECS has no dependency like original, how can I get my target object from ECS?

Unity official please answer me, thanks a lot.

by the way, how to use Raycast(), ScreenPointToRay(), etc, still like original? But they are contain many GameObjects ! How the ECS solve these problems?
Thanks.

I believe you want the DOTS Physics forum, not this one.

Thank you!

1 Like

hi MelvMay,
Could you please help me to consult with your colleagues in the DOTS group? Question: https://discussions.unity.com/t/838069
I finally updated the question on how to use ConfigurableJoint in ECS. A lot of Vector3 and GameObject are used in “Jonit”, and these are not supported in ECS! How can I modify the code so that they can be used in ECS? Thank you!

Sorry but messaging me directly won’t get you a fast-track to answers or changes as I have nothing whatsoever to do with that aspect of the engine. Posting in that forum is the best thing to do.

Ok Got it