To prevent UI clicks from filtering down to other objects:
using UnityEngine.EventSystems;
if (EventSystem.current.IsPointerOverGameObject ()) return; // Check if on a UI Object, if so ignore