Builds crash with Renderer2DData serialization error

I’m not sure exactly what causes our crashes, but this is the first error message in the player log.

We’re using Unity 2020.2 and Universal RP 10.2.2

1 Like
namespace UnityEngine.Experimental.Rendering.Universal
{
    public partial class Renderer2DData
    {
#if UNITY_EDITOR
        [SerializeField]
        Renderer2DDefaultMaterialType m_DefaultMaterialType = Renderer2DDefaultMaterialType.Lit;

        [SerializeField, Reload("Runtime/Materials/Sprite-Lit-Default.mat")]
        Material m_DefaultCustomMaterial = null;

        [SerializeField, Reload("Runtime/Materials/Sprite-Lit-Default.mat")]
        Material m_DefaultLitMaterial = null;

        [SerializeField, Reload("Runtime/Materials/Sprite-Unlit-Default.mat")]
        Material m_DefaultUnlitMaterial = null;
1 Like

I had this exact issue as well in (what I assumed) all 2020.2 Unity versions. :hushed:
After I upgraded to 2021.1b and Universal RP 11.x.x the issue went away. Hopefully they backport the fix to Universal RP 10.2.x (given that fixing the error should be trivial), but we shall see. :sweat_smile:

1 Like

I ended up investigating this for days. What I know is that it goes away if I change which packages are in use in my project, but I can remove almost everything else.

Hi guys! Is there any solution?
I have the same in Unity 2022.3.16 with Universal RP 14.0.9.