/// <summary> /// Repaints the editor if a repaint has been requested. If the currently rendering window is not an InspectorWindow, Repaint() will be called on the current window as well. /// </summary> /// <param name="editor">The editor to repaint.</param> public static void RepaintIfRequested(this Editor editor) { EditorTimeHelper.Time.Update(); if (GUIHelper.RepaintRequested) { editor.Repaint(); if (CurrentWindow != null && CurrentWindow.GetType() != inspectorWindowType) { CurrentWindow.Repaint(); } if (Event.current.type == EventType.Repaint) { EditorTimeHelper.RemoveOldWindowTimeHelper(); GUIHelper.ClearRepaintRequest(); } } }