Search Unity

Why isn't there an inbuilt way to generate a desktop launching Unity project shortcut?

Discussion in 'Editor & General Support' started by Arowx, Oct 16, 2020.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Just wondering, thought this would be a handy feature and save quite a bit of developers time over the years.

    Or is there and I've just missed it all this time?
     
    Sudopia_Games likes this.
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I would try creating a shortcut or bat file which opens the editor using the -projectPath command line option to specify the specific project. I suspect that will do what you want. Though even if it works, a cleaner way of creating such a shortcut would be a nice feature.

    https://docs.unity3d.com/Manual/CommandLineArguments.html
     
  3. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Technically, you can just click on the scene myScene.unity and it will trigger Unity launcher.
    The only problem is, if you have more than one Unity installed, or have multiple projects in different Unity versions, It may launch none desired Unity version.
    So this approach seems to be suitable, for the single selected Unity version.

    Or going back to command line approach, maybe the only resealable solution.
     
  4. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    What about launching via UnityHub shortcut command line to UnityHub to open project in correct version of unity?
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    What problem you try to solve?
    Unity hub opens nearly instantaneously anyway.
    It gives you all basics information and options for projects, that are needed.
     
    Joe-Censored likes this.
  6. Luxalpa

    Luxalpa

    Joined:
    May 13, 2014
    Posts:
    8
    I don't want basic information about projects, I want to open my project without having to first opening the launcher, then finding my project, then clicking to open the project, then finding the launcher in order to close it again. It's a super annoying workflow. Unreal Engine doesn't have this problem.
     
    Arowx likes this.
  7. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    How hard would it be to have a .unity project file type that opens with the Unity Hub/Unity Editor?
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It already does that, but as Antypodish said, it will probably open in a random version of Unity if you have multiple versions installed.

    You can achieve what you want by creating a shortcut to desired Unity.exe, opening the shortcut properties and adding "-projectpath <PATH_TO_PROJECT>" argument.
     
    ManojYT likes this.
  9. VortexInCortex

    VortexInCortex

    Joined:
    Apr 13, 2019
    Posts:
    12
    Found it, just search for the scene in ur project folder, u will find the scene being a unity.exe, just create a shortcut which u bring to desktop and rename it if u want, when u open wit the unity editor it will open instantly
     
  10. Sudopia_Games

    Sudopia_Games

    Joined:
    Apr 27, 2023
    Posts:
    1
    On Windows, you can:
    - create a new file "unityShortcut.cmd", in this file put this content:
    start "" "Absolute\Path\To\Your\Editor\Unity.exe" -projectPath "Absolute\Path\To\Your\Project"

    - then you can just double click your shortcut
    - you can do something similar on Mac & Linux with a .sh file