Releases: AlexeyTaranov/SerializeReferenceDropdown
Releases · AlexeyTaranov/SerializeReferenceDropdown
0.4.0 Generics support
Unity 2023.2 support generics!
Code Example
public class TestShapesForSRD : MonoBehaviour
{
[SerializeReference, SerializeReferenceDropdown]
private ISimpleGenericData<int> _intData;
}
public interface ISimpleGenericData<TData> : IAbstractData
{
public TData Data { get; }
}
[Serializable]
public class GenericData<TData> : ISimpleGenericData<TData>
{
[SerializeField] private TData _data;
public TData Data => _data;
}
[Serializable]
public class GenericKeyValuePair<TKeyData, TValueData> : ISimpleGenericData<TKeyData>, IAbstractData
{
[SerializeField] private TKeyData _key;
[SerializeField] private TValueData _value;
public TKeyData Data => _key;
}
Version 0.1.1: Improved performance
Version 0.1.1: Improved performance
Improved performance: select types with TypeCache
https://docs.unity3d.com/ScriptReference/TypeCache.html