void OnTriggerExit2D(Collider2D other) { var uIDrag = other.gameObject.GetComponent<UIDrag> (); if (DroppedObject == uIDrag && AllowRelease) { Debug.Log ("Releasing drag object"); DroppedObject.Dropped = null; DroppedObject = null; } }