This commit is contained in:
SoulliesOfficial
2025-12-17 04:19:38 -05:00
parent 7c1cb7e8e1
commit d15957c719
4315 changed files with 8260710 additions and 2940 deletions

View File

@@ -0,0 +1,30 @@
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
namespace GraphicsCat
{
[CustomPropertyDrawer(typeof(InspectorDisplayNameAttribute))]
public class InspectorDisplayNameDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var attr = (InspectorDisplayNameAttribute)attribute;
var content = string.IsNullOrEmpty(attr.tooltip)
? new GUIContent(attr.displayName)
: new GUIContent(attr.displayName, attr.tooltip);
EditorGUI.BeginProperty(position, content, property);
EditorGUI.PropertyField(position, property, content, true); // 'true' allows drawing children
EditorGUI.EndProperty();
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUI.GetPropertyHeight(property, label, true);
}
}
}
#endif