Click on the top layer only!
A must for every game using a mouse. Make sure the player doesn't click on anything behind a window or button. This script checks the depth of all clickable objects and makes sure that only the one closest to the camera is selected.
Simple and easy to use, just one script and one object!
End User Licence Agreement (EULA).