Skip to main content
New Participant
June 12, 2015

Unity 5.1.0f3 and Unity 4 Integration V0.6.0.0-beta

I installed the latest version of Unity. Create the empty project with Unity 4 Integration. Updated Runtime. But there was a error:
"
Assets/OVR/Editor/OVRShimLoader.cs(56,32): error CS0117: `UnityEditor.PlayerSettings' does not contain a definition for `d3d11ForceExclusiveMode'
"
How to solve the problem?
    This topic has been closed for replies.

    11 replies

    June 13, 2015
    Same problem on Unity 5.1.0p1
    New Participant
    June 13, 2015
    It might not be the right solution, but in the OVRShimLoader.cs commenting out the Unity 5 part removes the error:

    //#if (UNITY_5_0)
    // PlayerSettings.d3d11FullscreenMode =
    // (OVRUnityVersionChecker.hasD3D11ExclusiveModeSupport) ? D3D11FullscreenMode.ExclusiveMode : D3D11FullscreenMode.FullscreenWindow;
    //#else
    // PlayerSettings.d3d11ForceExclusiveMode = OVRUnityVersionChecker.hasD3D11ExclusiveModeSupport;
    //#endif
    Up and Coming
    June 14, 2015
    Rather than commenting it out, why not also check for Unty 5.1? I tried this, and it seems to work:


    #if (UNITY_5_1 || UNITY_5_0)
    Shinyfish Software, Inc. - @ShinyfishGames - Neon Jack (Rift DK2) - Sticks 'N Steel (iOS)
    Up and Coming
    June 14, 2015
    I'm also getting this error. To check if it was an update issue I created a new project and imported the Oculus Package and got the error straight away. So it does happen on a clean Unity3d 5.1.0f3 project.
    New Participant
    June 16, 2015
    "jaba" wrote:
    Rather than commenting it out, why not also check for Unty 5.1? I tried this, and it seems to work:


    #if (UNITY_5_1 || UNITY_5_0)

    i am try but unity Send error report

    http://pan.baidu.com/s/1ntKKgHF
    New Participant
    June 16, 2015
    I can confirm that jaba is right. It worked for me too. I am using Unity 5.1.0f3 32-bit
    Inspiring
    June 16, 2015
    Sorry about this. It will be fixed soon. For now, you'll just have to edit the code as shown by jaba.
    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
    New Participant
    June 20, 2015
    "jaba" wrote:
    Rather than commenting it out, why not also check for Unty 5.1? I tried this, and it seems to work:


    #if (UNITY_5_1 || UNITY_5_0)


    thanks, jaba. {00}
    New Participant
    July 24, 2015
    Thanks Jaba; worked for me too.
    New Participant
    September 13, 2015
    I just recently started getting this error message in Unity in my VR project. Where exactly do I add the code:

    #if (UNITY_5_1 || UNITY_5_0) ?

    Any help is much appreciated.