mirror of
https://github.com/lllyasviel/YGOProUnity_V2.git
synced 2026-10-19 23:45:38 +08:00
29 lines
753 B
C#
29 lines
753 B
C#
//----------------------------------------------
|
|
// NGUI: Next-Gen UI kit
|
|
// Copyright © 2011-2015 Tasharen Entertainment
|
|
//----------------------------------------------
|
|
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
[CanEditMultipleObjects]
|
|
#if UNITY_3_5
|
|
[CustomEditor(typeof(UIButtonKeys))]
|
|
#else
|
|
[CustomEditor(typeof(UIButtonKeys), true)]
|
|
#endif
|
|
public class UIButtonKeysEditor : UIKeyNavigationEditor
|
|
{
|
|
public override void OnInspectorGUI ()
|
|
{
|
|
base.OnInspectorGUI();
|
|
EditorGUILayout.HelpBox("This component has been replaced by UIKeyNavigation.", MessageType.Warning);
|
|
|
|
if (GUILayout.Button("Auto-Upgrade"))
|
|
{
|
|
NGUIEditorTools.ReplaceClass(serializedObject, typeof(UIKeyNavigation));
|
|
Selection.activeGameObject = null;
|
|
}
|
|
}
|
|
}
|