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
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question XRGraphics throwing error

Discussion in 'Unity 6 Beta' started by m4robb, Jan 18, 2024.

  1. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    hi there, trying out 2023.3.b3. HDRP. Opening an existing project, I have some scripts from existing assets throwing error on not finding XRGraphics. Is there a replacement for this? It would be great to hack a workaround to keep the assets going until the asset devs can catch up with the new version. thanks in advance
     
    RKaffer likes this.
  2. RKaffer

    RKaffer

    Joined:
    Aug 19, 2019
    Posts:
    3
    I don't know if this would still be helpful, but I'm still trying to figure this problem out myself. I had a script calling
    Code (CSharp):
    1.  
    2. if (RenderPipelineHelper.IsUniversal)
    3. {
    4.     isMSAA = isMSAA || XRGraphics.enabled;
    5. }
    and it was giving me errors, I replaced it with
    Code (CSharp):
    1.  
    2. if (RenderPipelineHelper.IsUniversal)
    3. {
    4.     isMSAA = isMSAA || UnityEngine.XR.XRSettings.enabled;
    5. }
    6.  
    and it at least seems to be doing the same thing and not giving errors anymore.
     
    Last edited: Apr 6, 2024