Tanoda
ReadOnlyDrawer.cs
Go to the documentation of this file.
1
4
using
UnityEditor
;
5
6
namespace
UnityEngine.UI.Extensions
7
{
8
[CustomPropertyDrawer(typeof(ReadOnlyAttribute))]
9
public
class
ReadOnlyDrawer
: PropertyDrawer
10
{
11
12
public
override
void
OnGUI
(Rect position, SerializedProperty property, GUIContent label)
13
{
14
GUI.enabled =
false
;
15
EditorGUI.PropertyField(position, property, label,
true
);
16
GUI.enabled =
true
;
17
}
18
}
19
}
UnityEngine.UI.Extensions.ReadOnlyDrawer
Definition:
ReadOnlyDrawer.cs:10
UnityEngine.UI.Extensions.ReadOnlyDrawer.OnGUI
override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
Definition:
ReadOnlyDrawer.cs:12
UnityEditor
Definition:
BoxSliderEditor.cs:6
UnityEngine.UI.Extensions
Credit Erdener Gonenc - @PixelEnvision.
Definition:
AccordionElementEditor.cs:8
Source
Assets
unity-ui-extensions
Editor
ReadOnlyDrawer.cs
Generated by
1.9.3