private void OnMouseDown() { // Make sure the panel isn't active if (!EventSystem.current.IsPointerOverGameObject()) { // Check if this is the right cube cubeManager.CheckCube(CubeManager.chosenOne == this); } }