1.6.0: Added FieldLabelFromType, StringToAnimationClipName and SingleSelectionFlag
This commit is contained in:
parent
7d99d62e11
commit
9faacb6291
15 changed files with 215 additions and 6 deletions
18
Editor/Predrawers/FieldLabelFromTypeAttributeDrawer.cs
Normal file
18
Editor/Predrawers/FieldLabelFromTypeAttributeDrawer.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(FieldLabelFromTypeAttribute))]
|
||||
internal sealed class FieldLabelFromTypeAttributeDrawer : PredrawerModifierPropertyDrawer
|
||||
{
|
||||
public override void Modify(PredrawerModifierPropertyAttribute attribute, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
Type type = property.GetValueType();
|
||||
|
||||
if (type != null)
|
||||
label.text = type.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3bdd32bf85da4f66b8096b490ff8b163
|
||||
timeCreated: 1656871465
|
||||
Loading…
Add table
Add a link
Reference in a new issue