Forum Discussion

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

OVRInput namespace not found in Visual Studio project but compiles and runs just fine

When I import the Oculus integration asset, code completion for the OVRInput namespace does not work ("the name OVRInput does not exist in the current context" in Visual Studio). Yet I can play and build just fine. It's almost as if the Visual Studio solution at the root of the project is not the same as the one Unity uses to build. Is there a way to fix this?

7 Replies

Replies have been turned off for this discussion
  • Anonymous's avatar
    Anonymous
    For those still struggling with this problem, it turns out that it was an issue with that particular version of Unity and how it generated solution files. What are the odds? It was fixed in the next release. Current versionsof Unity should no longer exhibit this.
  • Anonymous's avatar
    Anonymous



    For those still struggling with this problem, it turns out that it was an issue with that particular version of Unity and how it generated solution files. What are the odds? It was fixed in the next release. Current versionsof Unity should no longer exhibit this.


    It still does :/ I'm running the latest 2019.4.14f1 and the issue is still there...
    The OVRInput.cs is clearly in the Oculus folder from the Oculus Integration package. Do you have to make a reference to it in your script?

  • *bump*  Using VS Code and Unity 2019.4 release.  Compiles fine, but shows reference error.

    Edit:  It comes and comes.  Sometimes when I open another script it'll give reference errors and sometimes it won't.
  • What fixed the issue for me was: Edit -> Preferences -> external tools -> regenerate project files.