Skip to main content
May 31, 2020 11:58 PM UTC

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

    Jul 20, 2020 4:07 AM UTC
    *bump*
    New Participant
    Aug 26, 2020 12:40 AM UTC
    *bump*
    New Participant
    Oct 30, 2020 1:58 AM UTC
    *bump*
    Nov 3, 2020 6:09 PM UTC
    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.
    Nov 5, 2020 10:48 PM UTC



    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
    Dec 3, 2020 6:32 PM UTC
    *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
    Dec 14, 2021 11:12 AM UTC

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