How to speed up build times? - Setting platform prior to Unity Application Launch

Hi All -

In an effort to help speed up build times, I’d like to know if anyone has any idea what dictates the Unity Editor application to launch under its last executed platform. (i.e. “iOS”, “Android”, or “PC, Mac, & Linux Standalone”)

General Build Process for Multiple Platform (using a Mac Pro as a Build Server)

  1. Git Checkout and Clean project Repo
    –The project is committed under the “PC, Mac, & Linux Standalone” platform in build settings.
  2. Command Line - Set Project Path & Execute Method
    –This causes the editor to import assets based on “PC, Mac, & Linux Standalone”.
  3. Executed Method Step - Change Platform to Desired
    –This causes the editor to re-import assets based on Desired Platform.
  4. Executed Method Step - BuildPlayer
  5. Archive

Instead of having to import assets in Item 2 for “PC, Mac, & Linux Standalone”, I’d like to be able to set the Unity Editor Application to open under the desired platform so the asset import phase is only executed once for the platform that is to be built.

Any help is greatly appreciated.

Hi,

If I understand correctly, I believe you can launch Unity and switch to the desired platform via the command line:

Windows:
“C:\Program Files\Unity\Editor\Unity.exe” -buildTarget android -projectPath path/to/project

OS X:
/Applications/Unity/Unity.app/Contents/MacOS/Unity -buildTarget android -projectPath path/to/project

See Unity - Manual: Command line arguments and look for “-buildTarget” for a list of platforms.