I wonder what is the most efficient way to check if a mesh is behind or in front of a 2d gui button. My gui buttons are linked to a mesh. The mesh is disabled because its only purpose is to position the gui button in 3d space. Due to the mesh I can get the vector3 position without any problems. My idea would be to make a ray between the gui position and the camera position and check if it hits another mesh. Since I have many different buttons I can imagine that calculating the rays all the time will be expensive. So is there any other approach to solve this? Or what would be best practice?