インスペクタのパラメータの名前を簡単に変えるエディタ拡張


属性

CustomLabelAttribute.cs
using UnityEngine;

public class CustomLabelAttribute : PropertyAttribute
{
    public readonly string Value;

    public CustomLabelAttribute(string value)
    {
        Value = value;
    }
}

エディタ側のコード

CustomLabelDrawer.cs

using UnityEditor;
using UnityEngine;

[CustomPropertyDrawer(typeof(CustomLabelAttribute))]
public class CustomLabelDrawer : PropertyDrawer
{
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            var newLabel = attribute as CustomLabelAttribute;
            EditorGUI.PropertyField(position, property, new GUIContent(newLabel.Value), true);
        }

        public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
        {
            return EditorGUI.GetPropertyHeight(property, true);
        }
}

追記2019/7/19
Rectや配列等のマルチラインに対応

使用側のコードサンプル

UseCustomLabelAttribute.cs
using UnityEngine;

public class UseCustomLabelAttribute : MonoBehaviour
{
    [CustomLabel("カウント")]
    public int Count;
}

適用前

適用後

名前だけ表示を変えたい事がよくあるんですけど
Unityの標準機能であるかな、と探してても見つからなかったので作りました。
競合とかは一切考えてないです