public override IEnumerable <GameObject> GetObjects() { foreach (var item in input.GetObjects()) { if (item != null && policyList.Find(item)) { yield return(item); } } }
private GameObject GetGrabbedObject(GameObject hand) { if (hand != null) { var grab = hand.GetComponent <VRTK_InteractGrab>(); if (grab != null) { var grabbed = grab.GetGrabbedObject(); if (grabbed != null && targetPolicy.Find(grabbed)) { return(grabbed); } } } return(null); }