void Awake() { if (Instance != null) { Destroy(gameObject); } else { Instance = this; Application.targetFrameRate = 35; } }
public override void OnInspectorGUI() { DrawDefaultInspector(); EditorGUILayout.Space(); EditorGUILayout.Space(); #region test if (EditorApplication.isPlaying) { MatchGUIController tg = (MatchGUIController)target; if (test = EditorGUILayout.Foldout(test, "Test")) { #region fill EditorGUILayout.BeginHorizontal("box"); if (GUILayout.Button("Show moves left")) { tg.ShowMessagMovesLeft("Warning", "5 moves left", 2); } if (GUILayout.Button("Show win")) { tg.ShowWin(null); } EditorGUILayout.EndHorizontal(); #endregion #region mission EditorGUILayout.BeginHorizontal("box"); if (GUILayout.Button("Mission")) { tg.ShowMission(null); } if (GUILayout.Button("Show win")) { tg.ShowWin(null); } EditorGUILayout.EndHorizontal(); #endregion } return; } EditorGUILayout.LabelField("Goto play mode for test"); #endregion test }