0312 CellView 和 ButtonEx 不能同时挂载在同一个
New file |
| | |
| | | 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(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bf9490ebf1f8440428653f05a332224f |
| | | MonoImporter: |
| | | externalObjects: {} |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |