Files
Cielonos/Assets/External VFXs/BOXOPHOBIC/Utils/Editor/StyledInspector/StyledInteractiveDrawer.cs
SoulliesOfficial ef7b479712 initial
2025-11-25 08:19:33 -05:00

29 lines
699 B
C#

// Cristian Pop - https://boxophobic.com/
using UnityEngine;
using UnityEditor;
namespace Boxophobic.StyledGUI
{
[CustomPropertyDrawer(typeof(StyledInteractive))]
public class StyledInteractiveAttributeDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
if (property.boolValue == true)
{
GUI.enabled = true;
}
else
{
GUI.enabled = false;
}
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return -2;
}
}
}