private void OnTriggerExit(Collider other) { IGrabable grabable = other.GetComponentInParent <IGrabable>(); if (grabable != null) { grabable.SetHighlighted(false); } }
private void OnTriggerEnter(Collider other) { IGrabable grabable = other.GetComponentInParent <IGrabable>(); if (grabable != null) { grabable.SetHighlighted(true); } //else //{ // Debug.Log("not an IGrabable"); //} }