Open Mustenaka opened 11 months ago
Test code:
ABase.cs
namespace Temp.ComponentInspectorTest
{
[System.Serializable]
public class ABase
{
public enum Type
{
A1Class,
A2Class,
}
public Type type;
}
}
A1Class.cs
namespace Temp.ComponentInspectorTest
{
[System.Serializable]
public class A1Class :ABase
{
public string a1Value;
}
}
A2Class.cs
namespace Temp.ComponentInspectorTest
{
[System.Serializable]
public class A2Class : ABase
{
public int a1Value;
}
}
B
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace Temp.ComponentInspectorTest
{
/// <summary>
/// Temp component, use for A
/// </summary>
public class B : MonoBehaviour
{
[SerializeReference] public List<ABase> a = new List<ABase>();
private void Start()
{
a.Add(new A1Class());
a.Add(new A2Class());
a.Add(new A1Class());
}
private void OnDisable()
{
if (a != null)
{
a.Clear();
}
}
}
}
2022 Error.
2019 No Error
Ready to override draw Inspector solution, independent of [SerializeReference]
PS: this bug same as macOS and Windows
When i try to visualize constraint constraint parameters in the Inspctor interface, there are some bugs in the rendering that can actually affect the display and debugging of the values because the Constraint is a generic design.
Unity 2022.3.13 LTS inspctor editor error. his bug does not appear in older 2019 versions.
influence An error occurs when the normalized serialization parameters are displayed.