Unable to get ObjectManipulator Reference MRTK

Viewed 15

Can anyone help me as to how do I get the reference of the ObjectManipulator Script attached on a GameObject on another script. I am unable to get its reference via GetComponent or by manually dragging it. I want the reference to temporarily disable it via script.

1 Answers

Ok so i figured this out. In order to get a reference to the ObjectManipulator, create a serialized variable of data type Behaviour and drag the ObjectManipulator in the hierarchy to the serialized field. You can then change the enabled property to enable/disable it. Behaviours are components that can be enabled/ disabled.

Related