Skip to content

focus-window does not restore minimized Unity window on macOS #1065

@hatayama

Description

@hatayama

Summary

On macOS, uloop focus-window does not appear to bring Unity back when the Unity Editor window is minimized.

Reproduction

  1. Open a Unity project with Unity CLI Loop available.

  2. Minimize the Unity Editor window on macOS.

  3. Run:

    uloop focus-window

Expected behavior

The Unity Editor window should be restored from the minimized state and focused.

Actual behavior

The command returns without effectively bringing the minimized Unity window back to the screen.

Notes

Current macOS focus implementation appears to only set the Unity process as frontmost via AppleScript:

  • Packages/src/Cli~/Dispatcher~/internal/dispatcher/process.go
  • Packages/src/Cli~/Core~/internal/presentation/cli/focus.go

That may be enough for a visible background window, but not for a minimized window. The macOS path likely needs an explicit window un-minimize / reopen step before focusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions