StyledScriptableObjectEditor.cs 556 B

1234567891011121314151617181920
  1. //#if UNITY_EDITOR
  2. using UnityEditor;
  3. namespace Boxophobic.StyledGUI
  4. {
  5. [CustomEditor(typeof(StyledScriptableObject), true)]
  6. [CanEditMultipleObjects]
  7. public class StyledScriptableObjectEditor : Editor
  8. {
  9. public override void OnInspectorGUI()
  10. {
  11. serializedObject.Update();
  12. EditorGUI.BeginChangeCheck();
  13. DrawPropertiesExcluding(serializedObject, "m_Script");
  14. if (EditorGUI.EndChangeCheck())
  15. serializedObject.ApplyModifiedProperties();
  16. }
  17. }
  18. }
  19. //#endif