cancel
Showing results for 
Search instead for 
Did you mean: 

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

OculusPrima
Honored Guest
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
13 REPLIES 13

cybereality
Grand Champion
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?

OculusPrima
Honored Guest
I am using my own created app in unity.

OculusPrima
Honored Guest
Does Oculus Utility compatible with Unity : 5.2.1f1, as per the link you have provided, the recommended version is 5.2.1p3.

cybereality
Grand Champion
It may work, but I'd suggest you use the recommended version to be safe.

OculusPrima
Honored Guest
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.

vrdaveb
Oculus Staff
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?

OculusPrima
Honored Guest
Hey, what folders and files you want me to remove ?
Can you plz tell me the path in Unity ?

vrdaveb
Oculus Staff
Enter "OVRGameView" in the search box of the Project pane and delete whatever comes up.

cybereality
Grand Champion
The folder is called "OVR" and also the "OculusPlugin.dll" from the "Plugins" folder.