Unity Engine documentationScript ReferenceUnityEditorEditorWindowhasFocusReturns true if EditorWindow is focused.Read time 1 minuteLast updated a month agoDefinition Type: Property Namespace: UnityEditor Assembly: UnityEditor.CoreModule public bool hasFocus { get; }