Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug PostProcessing and XR Settings

Discussion in 'Editor & General Support' started by WickedRabbitGames, Apr 16, 2020.

  1. WickedRabbitGames

    WickedRabbitGames

    Joined:
    Oct 11, 2015
    Posts:
    79
    Help! I don't know how I got here, but my project is dead in the water with two compile errors I don't begin to know how to fix. Note... I don't want XR, VR or AR. This is for a PC/Mac/Linux RPG. I do want the post-processing stack.

    Library\PackageCache\com.unity.postprocessing@2.3.0\PostProcessing\Runtime\PostProcessLayer.cs(9,39): error CS1069: The type name 'XRSettings' could not be found in the namespace 'UnityEngine.XR'. This type has been forwarded to assembly 'UnityEngine.VRModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' Enable the built in package 'VR' in the Package Manager window to fix this error.

    Library\PackageCache\com.unity.postprocessing@2.3.0\PostProcessing\Runtime\PostProcessRenderContext.cs(6,39): error CS1069: The type name 'XRSettings' could not be found in the namespace 'UnityEngine.XR'. This type has been forwarded to assembly 'UnityEngine.VRModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' Enable the built in package 'VR' in the Package Manager window to fix this error.

    Any thoughts?
     
    kosowski likes this.
  2. Flavelius

    Flavelius

    Joined:
    Jul 8, 2012
    Posts:
    945
    Just wanted to say that i'm experiencing the same. Disabling VR/XR from the package manager creates this error.
    It's a strange error, because the offending part seems to be enclosed in #if ENABLE_VR which according to jetbrains rider seems to not even be defined (greyed out).

    Edit: it seems this define comes from the engine/internals. Then this is just a plain oversight from the devs
     
    Last edited: Jul 11, 2020
    Samuel411 likes this.
  3. ustincameron

    ustincameron

    Joined:
    Oct 20, 2018
    Posts:
    5
    Any update here? I ran into this issue when switching to tvOS platform, now it's the only one that compiles? Everything else throws the XRSettings does not exist/context error.
     
  4. MartinCoatsink

    MartinCoatsink

    Joined:
    Nov 13, 2019
    Posts:
    7
    I can usually work around this issue by restarting Unity.

    Not sure why it happens, but I'm guessing it might be related to the custom code generation we got, since that's hooked up to run after scripts are changes/domain reload.
     
  5. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,737
    1. Close Unity
    2. Open the .../Package/manifest.json file
    3. Add the 2 following packages :
    Code (CSharp):
    1. "com.unity.modules.vr": "1.0.0",
    2. "com.unity.modules.xr": "1.0.0"