private static void DoDebugControls() { int num = FsmErrorChecker.CountAllErrors(); string text = Strings.get_DebugToolbar_No_errors(); if (num > 0) { text = string.Format("{0} {1}", num, (num > 1) ? Strings.get_DebugToolbar_Label_Errors() : Strings.get_DebugToolbar_Label_Error()); } SkillEditorContent.DebugToolbarErrorCount.set_text(text); if (GUILayout.Button(SkillEditorContent.DebugToolbarErrorCount, SkillEditorStyles.ErrorCount, new GUILayoutOption[0])) { SkillEditor.OpenErrorWindow(); GUIUtility.ExitGUI(); } if (Event.get_current().get_type() == 7) { Rect lastRect = GUILayoutUtility.GetLastRect(); lastRect.set_x(lastRect.get_x() + 4f); lastRect.set_y(lastRect.get_y() + 2f); float width; lastRect.set_height(width = 14f); lastRect.set_width(width); GUIHelpers.DrawTexture(lastRect, (num > 0) ? SkillEditorStyles.Errors : SkillEditorStyles.NoErrors, Color.get_white(), 0); } GUILayout.Space(10f); if (GUILayout.Button(SkillEditorContent.DebugToolbarDebug, EditorStyles.get_toolbarDropDown(), new GUILayoutOption[0])) { DebugToolbar.DoDebugMenu(); } }