Added FieldLabelFrom attribute
This commit is contained in:
parent
52ee51c61c
commit
81bac32538
6 changed files with 60 additions and 0 deletions
3
Runtime/Predrawers.meta
Normal file
3
Runtime/Predrawers.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 968b630d4caa4605886ae1c1d7f3bdd8
|
||||
timeCreated: 1638612567
|
||||
23
Runtime/Predrawers/FieldLabelFromAttribute.cs
Normal file
23
Runtime/Predrawers/FieldLabelFromAttribute.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class FieldLabelFromAttribute : PredrawerModifierPropertyAttribute
|
||||
{
|
||||
public readonly string fieldName;
|
||||
public readonly bool nicify;
|
||||
|
||||
public FieldLabelFromAttribute(string fieldName)
|
||||
{
|
||||
this.fieldName = fieldName;
|
||||
nicify = true;
|
||||
}
|
||||
|
||||
public FieldLabelFromAttribute(string fieldName, bool nicify)
|
||||
{
|
||||
this.fieldName = fieldName;
|
||||
this.nicify = nicify;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/Predrawers/FieldLabelFromAttribute.cs.meta
Normal file
3
Runtime/Predrawers/FieldLabelFromAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b3ebd4bca514492f87bc5660d98a1a6c
|
||||
timeCreated: 1638612604
|
||||
Loading…
Add table
Add a link
Reference in a new issue