Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Annoyance: Launching Unity with -projectPath arg opens the Hub instead

Discussion in 'Editor & General Support' started by HarvesteR, Mar 15, 2024.

  1. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Hi,

    I've looked around for this issue in couldn't find anything.

    Lately I've been having this annoying problem where when I try to open the unity editor using the -projectPath argument.

    Unity opens, I see the splash screen at least... But then it closes and the Unity hub comes up instead.

    I can click the project on the hub then, and it will open correctly, but it's annoying because the whole point of the -projectPath argument is to automate launching unity with the right project already.

    Anybody have any ideas about what could be causing this? I tried putting commas around the project path and all that stuff, didn't seem to have much effect. I'm half suspecting there might be something related to the license... Maybe unity hub is feeding some sort of license data to the editor that isn't there when I call it up by command line? I don't know.

    Thanks in advance for any help!

    Cheers
     
  2. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,937
    Yes, you've guessed correctly. Is it happening even with the icon in the task tray?
     
  3. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    Yep. Just double checked to confirm, even if the Hub is open in the tray, same thing happens.
     
  4. HarvesteR

    HarvesteR

    Joined:
    May 22, 2009
    Posts:
    531
    I should mention, I'm also half suspecting some sort of file access drama, because I'm noticing that some parts of my custom layout don't show (mainly detached windows) when the project opens... I need to then restore the layout from the dropdown.

    Not sure if it's even related, but it wouldn't be the first time I've had trouble with windows changing its mind about who owns files and folders.
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,756
    That should work. Hub should not open. Can you share the editor log (take it after the hub opens, but don't click on any project).