|
@@ -0,0 +1,19 @@
|
|
|
|
+using System.Collections;
|
|
|
|
+using System.Collections.Generic;
|
|
|
|
+using UnityEngine;
|
|
|
|
+using UnityEditor;
|
|
|
|
+using KairoEngine.Core;
|
|
|
|
+
|
|
|
|
+namespace KairoEngine.Core.Editor
|
|
|
|
+{
|
|
|
|
+ [CustomPropertyDrawer(typeof(LayerAttribute))]
|
|
|
|
+ class LayerAttributeEditor : PropertyDrawer
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
|
|
|
+ {
|
|
|
|
+ // One line of oxygen free code.
|
|
|
|
+ property.intValue = EditorGUI.LayerField(position, label, property.intValue);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|