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

HDSRP VR error

Discussion in 'Graphics Experimental Previews' started by Maxse93, Jan 11, 2019.

  1. Maxse93

    Maxse93

    Joined:
    Feb 4, 2017
    Posts:
    3
    Hey!

    So I followed the HDSRP-guide (https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/VR-in-HDRP) for VR, but my screen remains black.
    Additionally I get the error:
    NullReferenceException: Object reference not set to an instance of an object
    UnityEngine.Rendering.PostProcessing.RuntimeUtilities.get_copyMaterial () (at Library/PackageCache/com.unity.postprocessing@2.1.2/PostProcessing/Runtime/Utils/RuntimeUtilities.cs:316)

    I wasn't able to regenerate the shader includes as it gave me authorization issues but changed the hsl.files instead. Any help on this issue?
     
    sewy likes this.
  2. WarmedxMints

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    1,035
    I had the same issue. Adding a post processing layer to the camera fixes the null reference.
     
  3. AudrasC

    AudrasC

    Joined:
    Feb 19, 2016
    Posts:
    19
    I have the same issue and adding a post processing layer does not fix the error.

    Using HDRP 4.7 on Unity 2018.3.0.f2 with PostProcessing 2.1.2 and OpenVR 1.0.2 (from package Manager).

    Edit: I have tried with HDRP 4.10 with Unity 2018.3.4f2 and PostPro 2.1.3

    Edit2: I've been able to make it work by adding the post processing layer to the camera. Actually, the post processing was deactivated in the HDRP profile which creates this error.

    Edit3: I have no error in the editor but when I build the exe, the error is thrown again.
    Code (CSharp):
    1. PostProcessResources s_Resources
    is null in UnityEngine.Rendering.PostProcessing.RuntimeUtilities. What should I do to have no the resource not null?
     
    Last edited: Feb 20, 2019
  4. AudrasC

    AudrasC

    Joined:
    Feb 19, 2016
    Posts:
    19
    I have found that I need to put in Player -> XR Setting -> "None" first then "OpenVR" so postprocessing will work correctly. Then I start OpenVR in runtime.