三国卡牌客户端基础资源仓库
hch
2025-10-14 8b457724aeabb8c9a1be12612a9082388e95a5f6
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), true)]
public class CellViewEditor : Editor
{
    public override void OnInspectorGUI()
    {
        CellView cellView = (CellView)target;
        ButtonEx buttonEx = cellView.GetComponent<ButtonEx>();
 
        if (buttonEx != null)
        {
            EditorGUILayout.HelpBox("CellView和ButtonEx 不能同时挂载!请改用Button", MessageType.Error);
        }
 
        base.OnInspectorGUI();
    }
 
}