Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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:
    943
    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,734
    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"