forked from Shardstone/trail-into-darkness
changed directory structure
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Jovian.InspectorTools
|
||||
{
|
||||
public class OverrideLabelAttribute : PropertyAttribute
|
||||
{
|
||||
public readonly string NewLabel;
|
||||
|
||||
public OverrideLabelAttribute(string newLabel) => NewLabel = newLabel;
|
||||
}
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
namespace Jovian.InspectorTools.Internal
|
||||
{
|
||||
using UnityEditor;
|
||||
|
||||
[CustomPropertyDrawer(typeof(OverrideLabelAttribute))]
|
||||
public class OverrideLabelDrawer : PropertyDrawer
|
||||
{
|
||||
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
label.text = ((OverrideLabelAttribute)attribute).NewLabel;
|
||||
EditorGUI.PropertyField(position, property, label);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user