Search Unity

Small issue on Mac: app switching to Hub doesn't work

Discussion in 'Unity Hub' started by Huacanacha, Aug 23, 2018.

  1. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Hub does not display it's user interface in some cases when app switching:
    1. Launch Hub
    2. Open a project
    3. CMD-TAB to Hub -> no user interface appears
    However, if I bring up Hub again via the Dock or Spotlight (and presumably via Applications) the UI appears as normal. Once the interface displays again app switching via CMD-TAB works once more. It seems the interface is hidden when opening a project and isn't redisplayed when app switching vs "launching".

    macOS High Sierra 10.13.6
    MacBook Pro (15-inch, 2018)
     
  2. afshinity

    afshinity

    Unity Technologies

    Joined:
    Jul 31, 2017
    Posts:
    334
    Hi there,

    It is a known issue/ behavior.
    This behavior (to close the hub window) was requested by some of our users but made others unhappy.
    We are working on a solution (maybe a setting) to make everyone happy.

    Thank a lot for the feedback
     
    MechEthan and Huacanacha like this.
  3. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Thanks. To me it's inconsistent behaviour vs every other app I run, and vs what I understand as typical Mac UX (while some apps stick around after last window is closed that's only if explicitly closed by user). If Hub is acting as a simple launcher then it should close when done (not just hide UI). If it's presenting as an app in and of itself it should stick around including the interface. I can see the utility in both so an option would be good - in fact I would probably go with the "close completely" option myself to avoid cluttering the dock / task switcher. It's the current middle ground that seems odd.
     
  4. MechEthan

    MechEthan

    Joined:
    Mar 23, 2016
    Posts:
    166
    Yeah, I'd rather Hub behave like other "Menu bar" applications -- no icon in the "Dock", but a popup UI that closes when it loses focus.

    If you look at 1Password on the Mac, for example:
    1. It has a unique, self-dismissing window that appears when clicking on the Menu bar icon.
    2. You can also separately run the full app which shows up in the Dock and it's full-featured window behaves like all other apps in the Dock.
    Doing both behaviors like 1Password is probably overkill for Unity Hub, so it should probably just go the route of consistency for a single mode.

    Hopefully you can do the Menu bar behavior, but no idea if it being an Electron app causes difficulties there.
     
  5. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    @afshinity I just realised that Hiding (CMD-H) and Minimizing (CMD-M) in macOS do subtly different things. Minimized apps stay hidden (no visible window) when switching to the app. Hidden apps have their window restored when switching back to the app.

    I assume that the current behaviour is due to you programmatically Minimizing the Hub after opening a project? If so just changing that to Hiding may give the best of both desired options (i.e. UI still hides but will be restored if switched to).
     
    afshinity likes this.
  6. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Is there any update on this? Hub 2.0 still has the automatic window closing behaviour.

    As mentioned before, Hiding the app instead of closing the window may give the best of both worlds. Hiding removes the UI from view but will restore it if the user switches back. It looks like you can Hide programmatically (I'm not a native Mac developer though so not sure).

    To support other suggestions for people wanting minimal Hub presence you can provide a user setting for what happens after opening a project:
    - Hide to hide the app but keep in Dock
    - Menu Icon to leave menu icon only and remove from Dock
     
  7. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Any update on when we can expect a fix or user setting?
     
  8. ManuelRauber

    ManuelRauber

    Joined:
    Apr 3, 2015
    Posts:
    122
    @Huacanacha On Mac it works different though. Even if you close the window, which on Windows would terminate the process, on Mac it only closes the window, but does not terminate the process, so it stills runs in the background.
    Then, if you switch to the application, on Electron on Mac you have to re-create the window to become visible again.
    That code is normally within the default template of a new electron application. I wonder, if Unity removed that, that's why it is not showing up on Mac when switching to it.
     
  9. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    945
    The current behaviour is terrible. I've never seen an app disappear but stay visible on the dock and the app switcher. Worse, when you switch to it, after opening a project, nothing happens or shows up.
    If you want to make the hub "disappear" into the menu bar, that's fine, but at least hide the dock and app switcher icons to avoid confusion.
     
    Last edited: Jan 31, 2020
    Huacanacha likes this.
  10. aerophloid

    aerophloid

    Joined:
    Apr 13, 2020
    Posts:
    2
    Can't believe it. That is MacOS basic programming and comes for free if you develop according to Apples guidelines but Unity is not able to fix this nasty bug. Embarrassing...
     
    Huacanacha likes this.
  11. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Yep it's kind of ridiculous it's still like this. Just follow the platform UX spec (Mac, Windows etc), unless there is a very good reason not to.