Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Editor serialization borked in all 2021.* releases?

Discussion in 'Editor & General Support' started by twebster, Nov 28, 2021.

  1. twebster

    twebster

    Joined:
    Jan 17, 2020
    Posts:
    2
    Okay, I don't know if it's borked in all 2021 releases, but I've tried back as far as 2021.1.24

    Here's what I'm seeing - started with a blank project (in 2020.3.17f1, and for this test, 2021.2.4f1), added in three things:

    Test.cs
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. [System.Serializable]
    4. public struct Test
    5. {
    6.     public int A;
    7.     public float B;
    8.     public Vector3 C;
    9. }
    ScriptableTest.cs
    Code (CSharp):
    1. using System.Collections.Generic;
    2. using UnityEngine;
    3.  
    4. [CreateAssetMenu(fileName = "ScriptableTest")]
    5. public partial class ScriptableTest : ScriptableObject
    6. {
    7.     public int Value;
    8.     public List<Test> TestArray;
    9. }
    GameObjectTest.cs
    Code (CSharp):
    1. using System.Collections.Generic;
    2. using UnityEngine;
    3.  
    4. public class GameObjectTest : MonoBehaviour
    5. {
    6.     public List<Test> TestArray;
    7. }
    Then I created a gameobject with GameObjectTest.cs as the script and also added a LineRenderer, and created a ScriptableTest scriptable object.

    The attached screenshots show the results. In 2020.3.17f1, I can view and modify the Test structure items in the list, in both the GameObject test and the ScriptableObjectTest. I can also view and modify the materials in the LineRenderer in both.

    In every 2021 version that I've tried, I can't edit the serialized structures, and I can't view/update/modify the LineRenderer material.

    Any thoughts on this? I put in a bug ticket a couple of weeks ago (specifically for the LineRenderer), and have heard exactly nothing back yet.
     

    Attached Files: