Skip to main content
May 31, 2020

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?

    This topic has been closed for replies.

    7 replies

    July 20, 2020
    *bump*
    New Participant
    August 26, 2020
    *bump*
    New Participant
    October 30, 2020
    *bump*
    November 3, 2020
    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.
    November 5, 2020



    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?

    New Participant
    December 3, 2020
    *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.
    Participant
    December 14, 2021

    What fixed the issue for me was: Edit -> Preferences -> external tools -> regenerate project files.