1.10.0: Added FieldLabelFromEnum for elements in an array
This commit is contained in:
parent
ea527c9b33
commit
a804633a14
6 changed files with 74 additions and 1 deletions
23
Runtime/Predrawers/FieldLabelFromEnumAttribute.cs
Normal file
23
Runtime/Predrawers/FieldLabelFromEnumAttribute.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class FieldLabelFromEnumAttribute : PredrawerModifierPropertyAttribute
|
||||
{
|
||||
public readonly Type type;
|
||||
public readonly bool nicify;
|
||||
|
||||
public FieldLabelFromEnumAttribute(Type type)
|
||||
{
|
||||
this.type = type;
|
||||
nicify = true;
|
||||
}
|
||||
|
||||
public FieldLabelFromEnumAttribute(Type type, bool nicify)
|
||||
{
|
||||
this.type = type;
|
||||
this.nicify = nicify;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/Predrawers/FieldLabelFromEnumAttribute.cs.meta
Normal file
3
Runtime/Predrawers/FieldLabelFromEnumAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: be6a15d8da91402c9a038f8a08fc4772
|
||||
timeCreated: 1732212352
|
||||
Loading…
Add table
Add a link
Reference in a new issue