AirControl  1.3.0
Open Source, Modular, and Extensible Flight Simulator For Deep Learning Research
XChartMgrEditor.cs
1 /************************************************/
2 /* */
3 /* Copyright (c) 2018 - 2021 monitor1394 */
4 /* https://github.com/monitor1394 */
5 /* */
6 /************************************************/
7 
8 using UnityEditor;
9 using UnityEngine;
10 
11 namespace XCharts
12 {
16 
17  [CustomEditor(typeof(XChartsMgr), false)]
18  public class XChartsMgrEditor : Editor
19  {
20  protected XChartsMgr m_Target;
21  protected SerializedProperty m_Script;
22  protected SerializedProperty m_NowVersion;
23  protected SerializedProperty m_NewVersion;
24 
25  protected virtual void OnEnable()
26  {
27  m_Target = (XChartsMgr)target;
28  m_Script = serializedObject.FindProperty("m_Script");
29  m_NowVersion = serializedObject.FindProperty("m_NowVersion");
30  m_NewVersion = serializedObject.FindProperty("m_NewVersion");
31  }
32 
33  public override void OnInspectorGUI()
34  {
35  if (m_Target == null && target == null)
36  {
37  base.OnInspectorGUI();
38  return;
39  }
40  serializedObject.Update();
41  EditorGUILayout.PropertyField(m_NowVersion);
42  EditorGUILayout.PropertyField(m_NewVersion);
43  if (GUILayout.Button("Check Update"))
44  {
45  CheckVersionEditor.ShowWindow();
46  }
47  if (GUILayout.Button("Github Homepage"))
48  {
49  Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts");
50  }
51  if (GUILayout.Button("Star Support"))
52  {
53  Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/stargazers");
54  }
55  if (GUILayout.Button("Issues"))
56  {
57  Application.OpenURL("https://github.com/monitor1394/unity-ugui-XCharts/issues");
58  }
59  serializedObject.ApplyModifiedProperties();
60  }
61  }
62 }
XCharts.XChartsMgrEditor
Editor class used to edit UI XChartsMgr.
Definition: XChartMgrEditor.cs:18
XCharts.CheckVersionEditor
Definition: CheckVersionEditor.cs:13
XCharts
Definition: RewardChart.cs:14
XCharts.XChartsMgr
Definition: XChartsMgr.cs:34