com.puzzlescapegames.services 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#if UNITY_EDITOR
|
|
2
|
+
using UnityEngine;
|
|
3
|
+
using UnityEditor;
|
|
4
|
+
|
|
5
|
+
namespace PuzzlescapeGames.Services
|
|
6
|
+
{
|
|
7
|
+
[ CustomPropertyDrawer( typeof(ReadOnlyAttribute) ) ]
|
|
8
|
+
public class ReadOnlyDrawer : PropertyDrawer
|
|
9
|
+
{
|
|
10
|
+
public override void OnGUI( Rect position, SerializedProperty property, GUIContent label )
|
|
11
|
+
{
|
|
12
|
+
GUI.enabled = false;
|
|
13
|
+
EditorGUI.PropertyField( position, property, label, true );
|
|
14
|
+
GUI.enabled = true;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
#endif
|