SteamVR_Controller could not be found

user93975 picture user93975 · Sep 21, 2018 · Viewed 15.6k times · Source

I am trying to create a Pokemon Go clone in Unity following this tutorial (https://www.youtube.com/watch?v=XH942mANiv4). However, I'm trying to also make it work in VR with SteamVR.

However, following the guide to the Vive on Wenderlich's website here (https://www.raywenderlich.com/792-htc-vive-tutorial-for-unity), I get the following error:

Assets/Scripts/ViveControllerInput.cs(7,13): error CS0246: The type or namespace name 'SteamVR_TrackedObject' could not be found. Are you missing 'Valve.VR' using directive?

I am dragging the ViveControllerInputTest onto both controllers, but I still get this compile error.

Without the script, I am able to put on the headset and see the controllers and walk around.

Any help would be appreciated! Thank you

Answer

mas picture mas · Oct 6, 2018

With the release of version 2.0 of the SteamVR Unity Plugin, Valve have updated the code to use the new SteamVR Input system (removing the previous Controller system). More info:

You can either: