1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| using UnityEditor;
| using UnityEngine;
|
| [CustomEditor(typeof(CellView))]
| public class CellViewEditor : Editor
| {
| public override void OnInspectorGUI()
| {
| CellView cellView = (CellView)target;
| ButtonEx buttonEx = cellView.GetComponent<ButtonEx>();
|
| if (buttonEx != null)
| {
| EditorGUILayout.HelpBox("CellView 和 ButtonEx 不能同时挂载在同一个 GameObject 上!", MessageType.Error);
| }
|
| base.OnInspectorGUI();
| }
|
| }
|
|