Search Unity

Bug upgraded from 7.20 to 8.0 and now I am getting spammed with asserts

Discussion in 'High Definition Render Pipeline' started by Pyromuffin, Jul 31, 2020.

  1. Pyromuffin

    Pyromuffin

    Joined:
    Aug 5, 2012
    Posts:
    85
    Assertion failed on expression: 'm_RendererData.m_LightProbeUsage != kLightProbeUsageOff'

    on line 1935 of HDRenderPipeline.cs

    Searching for that string or even the enum value "kLightProbeUsageOff" gives me no results. Seems like something is mad that I'm not using light probes. The funny thing is, even when I add light probes to the project I still get this assertion spam, once per frame.

    Any work around would be appreciated, I'm not using lightprobes and I can't find a way to disable them in HDRP asset settings.

    Thanks!

    Edit: it seems to be related to RT GI. Toggling RT GI to off causes this assert to go away.
     
    Last edited: Jul 31, 2020
    MasonWheeler likes this.
  2. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    This happens when one or more object(s) with Mesh Renderer component has "Light Probes" option set to "Off" (set it to "Blend Probes" to fix). Feels like a bug, present even in latest 2020.19a.
     
    MasonWheeler and BigRookGames like this.
  3. BigRookGames

    BigRookGames

    Joined:
    Nov 24, 2014
    Posts:
    330
    Thank you, that was getting old.

    for anyone else:
    Code (CSharp):
    1. public void FixLightProbeError()
    2.     {
    3.         foreach (MeshRenderer go in Resources.FindObjectsOfTypeAll(typeof(MeshRenderer)) as MeshRenderer[])
    4.         {
    5.             if (go.lightProbeUsage == UnityEngine.Rendering.LightProbeUsage.Off) go.lightProbeUsage = UnityEngine.Rendering.LightProbeUsage.BlendProbes;
    6.         }
    7.     }
     
    Magasenakwa, olix4242 and Pyromuffin like this.
  4. Kuba

    Kuba

    Moderator

    Joined:
    Jan 13, 2009
    Posts:
    416
    Hey @Pyromuffin,

    I tried to repro here with various combinations of Unity and HDRP and various upgrade paths, but I'm not hitting the issue.
    Could you perhaps submit a bug report and post the case number here, so that we can see the issue you're hitting more easily?

    Cheers,
    Kuba
     
    BigRookGames likes this.
  5. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    For me it happens when "HDRP + DXR" configuration is used - even on default HDRP sample scene this error will happens if DXR is/was enabled in project configuration.
     
    Last edited: Aug 7, 2020
    MasonWheeler and BigRookGames like this.
  6. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    I am not sure if it helps but for all my migrated projects to Unity 2020.2b7 with HDRP 10.0.0-preview.27
    i got the Assertion failed on expression: 'm_RendererData.m_LightProbeUsage != kLightProbeUsageOff' spaming my console.

    I set my objects and prefabs from Light Probes" option set to "Off" to "Blend Probes" and saved scenes and prefabs with this option. The error message keeps on spaming,

    The only way was to manual delete the prefabs from project and recreate them with "Blend Probes" setting.
    Only then the error disapaers.
    So it seems to be an bug in at least in migrated prefabs from older versions.
    They show "Blend Probes" but internally they stay on "Off"?
    However, recreating them with "Blend Probes" setting stopped it for me.
    Setting the option on old prefabs did not help.
     
  7. MasonWheeler

    MasonWheeler

    Joined:
    Apr 2, 2016
    Posts:
    219
    Seeing this too in 2020.1.14f1. Turning it to Blend Probes doesn't help when I deliberately turned off Light Probes because I don't want them for this particular object.

    Please fix this quickly!
     
  8. olix4242

    olix4242

    Joined:
    Jul 21, 2013
    Posts:
    1,962
    Had this error also in Unity 2020.2.0b12. Script solution helped to get rid of it. Thanks.
     
    BigRookGames likes this.