OVRLayerAttributeEditor.cs 363 B

1234567891011
  1. using UnityEditor;
  2. using UnityEngine;
  3. [CustomPropertyDrawer(typeof(OVRLayerAttribute))]
  4. class LayerAttributeEditor : PropertyDrawer {
  5. public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
  6. {
  7. // One line of oxygen free code.
  8. property.intValue = EditorGUI.LayerField(position, label, property.intValue);
  9. }
  10. }