Newbie Question | Appear UI Button when clicked 3D Object like FarmVille

Hello guys, today i studied raycast with build 3d object to ground. It was easy for me :p. But i have no idea what type of function i need to use for my question.

  1. Build 3D object ground (I did already)
  2. When click 3d Object I want to show buttons in order to manage something.When click ground or the point different from 3d object collider, buttons must hide.

In part 2 i cant attached UI buttons 3D object. When i built different location, UI still stay same pos. Any idea or any way to achieve this problem. Thanks for your time !

Check how Selection class in Unity is working and basically do the same. Save reference to currently selected object and when selecting another or clicking on the ground, remove ui from this object

1 Like

thanks i will be work for that.