It is possible to create an instance of a field in the Unity inspector, on a field marked [SerializeReference, SubclassSelector], whose data type is a concrete, pure C# data.
Actual Behavior
Only <null> shows in the Unity inspector on a field marked [SerializeReference, SubclassSelector], whose data type is a concrete, pure C# data.
Code example:
using System;
using UnityEngine;
public class ReferenceTester : MonoBehaviour {
[Serializable]
public class Data {
public int intValue;
}
[SerializeReference, SubclassSelector] private Data example;
}
What happened?
Desired Behavior
It is possible to create an instance of a field in the Unity inspector, on a field marked
[SerializeReference, SubclassSelector]
, whose data type is a concrete, pure C# data.Actual Behavior
Only
<null>
shows in the Unity inspector on a field marked[SerializeReference, SubclassSelector]
, whose data type is a concrete, pure C# data.Code example:
Package Version
1.1.4
Unity Version
2021.2.15f1