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