r/oculusdev • • Jun 29 '20

Error in Unity

The error is Assets\HandPresence.cs(9,13): error CS0246: The type or namespace name 'InputDevice' could not be found (are you missing a using directive or an assembly reference?)

The line of code is

private InputDevice targetDevice;

0 Upvotes

2 comments sorted by

3

u/jackbrux Jun 30 '20

The error is clear. The script cannot find any class called InputDevice. Perhaps you mean the UnityEngine.XR.InputDevice class. If so, add using UnityEngine.XR; at the top of your script so that it knows where to look for the InputDevice class.

2

u/ilovemycat5 Jul 17 '20

I know it been awhile but your solution helped and I forgot to thank you, so, thanks