Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
chris_banwell_3's avatar
chris_banwell_3
Honored Guest
6 years ago

How to GetComponent<OvrAvatar>()

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?

1 Reply

Replies have been turned off for this discussion