LayerAttributeEditor.cs 526 B

12345678910111213141516171819
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEditor;
  5. using KairoEngine.Core;
  6. namespace KairoEngine.Core.Editor
  7. {
  8. [CustomPropertyDrawer(typeof(LayerAttribute))]
  9. class LayerAttributeEditor : PropertyDrawer
  10. {
  11. public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
  12. {
  13. // One line of oxygen free code.
  14. property.intValue = EditorGUI.LayerField(position, label, property.intValue);
  15. }
  16. }
  17. }