Just curious if anyone knows a solution to this. When I grab an exisiting project repository it always opens it as ‘PC/Mac standalone’ platform, it then does its asset converting magic. I then select the platform I actually want (iOs) and it converts again. Is there anyway to open the project in the desired platform in the first place?
Check the Command line arguments: Unity - Manual: Command line arguments
You can open the project at a certain path with -projectPath and select a build Target with -buildTarget
Just to update this, you can now choose the target platform you want the project to launch with in the unity hub. Just change the “Current Platform” dropdown to your desired platform instead.
If you still need to do this via the command line, an easy way to do this is to locate your unity.exe, create a shortcut for it, and edit the shortcuts target to have your desired platform in the command line. Then run the shortcut. Otherwise, just enter the command in the command line or terminal.
For example, I set my shortcut’s target to this:
"C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Unity.exe" -buildTarget StandaloneWindows64 -projectPath "D:\Projects\UnityProject\"
Note that I put quotes around the file paths in case there were spaces in them but they are not required if there are no spaces.
You can find the list of build targets here:
Like @DiegoSLTS said, you can find other command line args here: