Skip to main content
Participant
June 14, 2020

How to GetComponent()

I'm trying to hide the controller when I grab an object, and show it when I release the object using OVRGrabber, ive edited the OVRGrabber script with the following:

if (m_grabbedObj)
{
            if (m_controller == OVRInput.Controller.LTouch)               
                transform.parent.GetComponent<OvrAvatar>().ShowLeftController(false);
}

But I get The Type or namespace 'OvrAvatar' could not be found.  I can see it's part of a dll, anybody got any ideas how to access it as a component or maybe a better way of hiding the controller when the object is grabbed?
This topic has been closed for replies.

1 reply

Participant
June 17, 2020
Anybody know how to get a reference to the OvrAvatar?