Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug 2022.1.0b2 Post Processing requires XR

Discussion in '2022.1 Beta' started by adamgolden, Jan 2, 2022.

  1. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,555
    Updating to 0b2 throws Post Processing package exceptions about XRSettings.

    Solution 1: Add the XR and VR packages to your project (in Package Manager, "Packages: Built-in").
    Solution 2: Right-click "Packages\Post Processing" (in Project window), select "Show in Explorer" to find the location. Copy the /com.unity.postprocessing@3.2.0 folder to a new location outside the project hierarchy. Edit \PostProcessing\Runtime\PostProcessLayer.cs file so the XRSettings dependency is commented out, like so:
    Code (CSharp):
    1.                             /*
    2.                             if (XRSettings.stereoRenderingMode == XRSettings.StereoRenderingMode.MultiPass)
    3.                                 m_Camera.projectionMatrix = m_Camera.GetStereoProjectionMatrix(Camera.StereoscopicEye.Left);
    4.                             */
    Then in Package Manager click the + button, Add Packages, Add From Disk and browse to the modified package.json.

    An official fix would be appreciated, since solution 1 adds unnecessary bloat (for non-XR projects), and solution 2 because the same fix would be required every time you update Post Processing package to a newer version.
     
    mahdi_jeddi likes this.
  2. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    246
    Yes, this is really annoying. I usually disable XR and VR packages, but now have to re-enable them.
     
  3. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    mahdi_jeddi and adamgolden like this.