module-inspector/Runtime/Drawers/SerializableReferenceToAttribute.cs

24 lines
581 B
C#

#if UNITY_2019_3_OR_NEWER
using System;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class SerializableReferenceToAttribute : DrawerPropertyAttribute
{
public readonly bool useType;
public readonly Type type;
public SerializableReferenceToAttribute()
{
useType = false;
}
public SerializableReferenceToAttribute(Type type)
{
this.type = type;
useType = true;
}
}
}
#endif