16 lines
521 B
C#
Raw Normal View History

2025-08-22 21:31:17 +05:00
using UnityEngine;
using UnityEditor;
namespace UGUIMiniMap
{
[CustomPropertyDrawer(typeof(CustomToggleAttribute))]
public class CustomToggleDrawer : PropertyDrawer
{
CustomToggleAttribute att { get { return ((CustomToggleAttribute)attribute); } }
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
property.boolValue = EditorGUI.ToggleLeft(position, att.title, property.boolValue, EditorStyles.toolbarButton);
}
}
}