Skip to main content
Participant
October 20, 2015

Type `OVRDisplay' does not contain a definition for `SetView

Hello All,

I am new with Oculus Rift and Unity.
Well I am trying to integrate Oculus Rift(0.7 Runtime and SDK) with Unity 5.2.1f1 version. But I am getting following error message :
Assets/OVR/Editor/OVRGameView.cs(48,52): error CS1061: Type `OVRDisplay' does not contain a definition for `SetViewport' and no extension method `SetViewport' of type `OVRDisplay' could be found (are you missing a using directive or an assembly reference?).

I searched this error everywhere, but not getting anything on it. I need you help guys, if anyone knows the fix for this or any suggestion would be great.

Thanks
    This topic has been closed for replies.

    13 replies

    Inspiring
    October 20, 2015
    First, make sure you are using the correct Unity version.

    viewtopic.php?f=37&t=25882

    Are you trying to compile one of the Oculus sample apps, or an existing app you made?
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Participant
    October 21, 2015
    I am using my own created app in unity.
    Participant
    October 21, 2015
    Does Oculus Utility compatible with Unity : 5.2.1f1, as per the link you have provided, the recommended version is 5.2.1p3.
    Inspiring
    October 21, 2015
    It may work, but I'd suggest you use the recommended version to be safe.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Participant
    October 21, 2015
    I re-installed Unity of version 5.2.1p3, but I am still getting the same error message:
    Here is the error message :
    Assets/OVR/Editor/OVRGameView.cs(48,52): error CS1061: Type `OVRDisplay' does not contain a definition for `SetViewport' and no extension method `SetViewport' of type `OVRDisplay' could be found (are you missing a using directive or an assembly reference?)

    Here I am attaching screenshot of it.
    Inspiring
    October 22, 2015
    OVRGameView should not be in your project. Can you remove it? It sounds like you didn't remove the Unity 4 integration from your project before installing the Unity 5 utilities. Can you delete the OVR folder and all Oculus files from the Plugins folder?
    Participant
    October 23, 2015
    Hey, what folders and files you want me to remove ?
    Can you plz tell me the path in Unity ?
    Inspiring
    October 23, 2015
    Enter "OVRGameView" in the search box of the Project pane and delete whatever comes up.
    Inspiring
    October 23, 2015
    The folder is called "OVR" and also the "OculusPlugin.dll" from the "Plugins" folder.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    March 6, 2016
    Hi... It was a while (some months) that I was not working with Unity to deploy on Samsung Gear VR. And to be honest, this is a bit messy situation.

    I've gone to what it is supposed to be the official documentation: https://developer.oculus.com/documentation/, and after going to mobile SDK, I get the: For setup instructions, be sure to review the Mobile Setup for Unity and Unreal Developers section of the Mobile SDK Setup Guide. Unity developers should then focus on our Utilities for Unity documentation (Unity 5.1+) ...

    So after downloading installing the mobile SDK, then I get the "4.6 unity version message", and start navigating through forums..

    Is there an updated guide to deploy a Samsung Gear VR app in Unity?

    I'm sorry, but I didn't find it, and it may be only my feeling, but it is always the same story. Every three months things change and generating a "HelloWorld" takes a 98% of annoying, painful, useless navigation through forums to find out how to setup all the things again, and a 2% of funny development... Could you please scale a message to Mr. M.Z. so that an increased budget can be provided to this? Just someone to provide updated documentation?