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

Builds crash with Renderer2DData serialization error

Discussion in '2D Experimental Preview' started by steinbitglis, Jan 28, 2021.

  1. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    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
     
    NotaNaN likes this.
  2. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    Code (CSharp):
    1. namespace UnityEngine.Experimental.Rendering.Universal
    2. {
    3.     public partial class Renderer2DData
    4.     {
    5. #if UNITY_EDITOR
    6.         [SerializeField]
    7.         Renderer2DDefaultMaterialType m_DefaultMaterialType = Renderer2DDefaultMaterialType.Lit;
    8.  
    9.         [SerializeField, Reload("Runtime/Materials/Sprite-Lit-Default.mat")]
    10.         Material m_DefaultCustomMaterial = null;
    11.  
    12.         [SerializeField, Reload("Runtime/Materials/Sprite-Lit-Default.mat")]
    13.         Material m_DefaultLitMaterial = null;
    14.  
    15.         [SerializeField, Reload("Runtime/Materials/Sprite-Unlit-Default.mat")]
    16.         Material m_DefaultUnlitMaterial = null;
     
    NotaNaN likes this.
  3. NotaNaN

    NotaNaN

    Joined:
    Dec 14, 2018
    Posts:
    325
    I had this exact issue as well in (what I assumed) all 2020.2 Unity versions. :eek:
    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. :oops:
     
    steinbitglis likes this.
  4. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    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.
     
  5. bobbigdan

    bobbigdan

    Joined:
    Nov 15, 2020
    Posts:
    10
    Hi guys! Is there any solution?
    I have the same in Unity 2022.3.16 with Universal RP 14.0.9.