using UnityEditor; using UnityEngine.UIElements; namespace EditorAttributes.Editor { [CustomPropertyDrawer(typeof(ReadOnlyAttribute))] public class ReadonlyDrawer : PropertyDrawerBase { public override VisualElement CreatePropertyGUI(SerializedProperty property) { var propertyField = CreatePropertyField(property); propertyField.SetEnabled(false); return propertyField; } } }