IEnumerator DisableHand(Hand h) { yield return(new WaitForSeconds(0.5f)); HandAnimation_v2 handAnim = h.GetComponentInChildren <HandAnimation_v2>(); foreach (Renderer r in handAnim.gameObject.GetComponentsInChildren <Renderer>()) { r.enabled = false; } }
void OnDetachedFromHand(Hand h) { HandAnimation_v2 handAnim = h.GetComponentInChildren <HandAnimation_v2>(); Renderer[] renderers = handAnim.gameObject.GetComponentsInChildren <Renderer>(); if (disableHandCrt != null) { StopCoroutine(disableHandCrt); } foreach (Renderer r in renderers) { r.enabled = true; } handAnim.NaturalPose(); }