1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| using UnityEngine;
| using UnityEditor;
| using Snxxz.UI;
|
| [CustomEditor(typeof(Window), true)]
| public class WindowEditor : Editor
| {
| private void OnEnable()
| {
| var safeArea = (target as Window).GetComponentInChildren<SafeAreaUI>();
| if (safeArea == null)
| SceneView.lastActiveSceneView?.ShowNotification(new GUIContent("警告:当前窗口还没添加SafeAreaUI脚本"),5);
| }
|
| public override void OnInspectorGUI()
| {
| base.OnInspectorGUI();
| }
| }
|
|