Search Unity

error CS0103: The name `VRDevice' does not exist in the current context

Discussion in 'Linux' started by xiotex, Dec 11, 2016.

  1. xiotex

    xiotex

    Joined:
    Sep 26, 2010
    Posts:
    37
    I just updated to Unity 5.5 and all of a sudden on my game which builds to Windows and MacOS is getting this error when attempting to build to Linux. Up till a couple of days ago I was on 5.4 and not getting this error.

    I'm not a Linux user, any idea, other than remove all references to VRDevice, on how to fix this?

    Since VR is not supported on MacOS and the builds succeed on that platform I assumed that VRDevice equated to a null device but it doesn't look like the Linux build platform even knows about it.
     
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    It looks like this is an unintentional API change on our side - VRDevice was exposed for all platforms in Unity 5.4, and only for VR-enabled platforms in Unity 5.5.
    You can work around this in your code by guarding references with ENABLE_VR (or, if you're only building for desktop, !UNITY_STANDALONE_LINUX) - we'll fix this on our end ASAP.