Implement SubclassSelectorAttribute.UseToStringAsLabel

This commit is contained in:
Makihiro
2024-10-26 23:31:00 +09:00
parent d9bc19329f
commit 0b79cd7e40
3 changed files with 23 additions and 4 deletions
@@ -4,7 +4,13 @@ using UnityEngine;
/// <summary>
/// Attribute to specify the type of the field serialized by the SerializeReference attribute in the inspector.
/// </summary>
[AttributeUsage(AttributeTargets.Field,AllowMultiple = false)]
public sealed class SubclassSelectorAttribute : PropertyAttribute {
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
public sealed class SubclassSelectorAttribute : PropertyAttribute
{
#if UNITY_2021_3_OR_NEWER
// NOTE: Use managedReferenceValue getter to invoke instance method in SubclassSelectorDrawer.
public bool UseToStringAsLabel { get; set; }
#endif
}