Search Unity

Question URP Missing Reference Exception at build time

Discussion in 'Universal Render Pipeline' started by BetaGreen, May 18, 2023.

  1. BetaGreen

    BetaGreen

    Joined:
    Mar 5, 2023
    Posts:
    6
    So, I've been working on a project for a while now. I'm trying to create a build of the game for the first time just to make sure everything is working properly. The issue is that every time I try to build it, I get one error that I can't figure out how to solve. Here's the exact error message.

    MissingReferenceException: The variable m_RendererDataList of UniversalRenderPipelineAsset doesn't exist anymore.
    You probably need to reassign the m_RendererDataList variable of the 'UniversalRenderPipelineAsset' script in the inspector.

    I've tried to find answers online as to how to fix this but haven't been able to find anything. Since it doesn't effect gameplay in editor and I can still test and edit the game, I figured I'd send out a forum here for the sake of time.

    Any and all thoughts would be helpful at this point.
     
  2. ciaranhappy1

    ciaranhappy1

    Joined:
    Oct 22, 2018
    Posts:
    15
    I think i know what might be going on.

    In your universal render pipeline asset, do you have any renderers in the renderer list? If you dont know what im talking about, its the 1 item long list at the top of the below screenshot. upload_2023-5-18_22-14-2.png
    Depending on if you used a template and how youve set things up, you may have multiple URP-assets. make sure every URP asset your project uses has a renderer. Stuff working in editor without a renderer is certainly strange, but that error seems to imply this is the issue.

    If you do have a renderer in that list, then you might want to create a new renderer and swap it out - see if that fixes the problem.

    If that dousnt fix it, then either im wrong (quite possible) or something is causing URP to not find the renderer somehow.
     
    Last edited: May 18, 2023
  3. BetaGreen

    BetaGreen

    Joined:
    Mar 5, 2023
    Posts:
    6
    You're 100% right.
    I was looking at the asset the error message mentioned, "UniversalRenderPipelineAsset', and didn't think about those assets.
    It should work fine once I deal with this.
    I do wish the error message was a bit more clear though.
    Thank you for the help!
     

    Attached Files:

    ciaranhappy1 likes this.