1.6.0: Added FieldLabelFromType, StringToAnimationClipName and SingleSelectionFlag

This commit is contained in:
Anders Ejlersen 2022-07-09 23:30:15 +02:00
parent 7d99d62e11
commit 9faacb6291
15 changed files with 215 additions and 6 deletions

View 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;
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3bdd32bf85da4f66b8096b490ff8b163
timeCreated: 1656871465