Multiple Projects Exporter – User Guide

How to use the Multiple Projects Exporter.

Getting Started
Should I use the 'Simple' or 'Advanced' tools?
The Interface
Export Config.
Running an Export

Getting Started
Import the Multiple Projects Exporter Unity package into your project. The multiple project exporter can then be loaded from ‘Window ––> Multiple Project Exporter’.

This window is split into three tabs; ’Simple’, ‘Advanced’ and ‘Export’
The main Player Settings and Build Scenes are saved to an ExportSettings asset file. Scene/ settings variants can be configured using Unity’s built-in options and then saved to different ExportSettings profiles. These can then be selected and written back onto the player/ build settings as required.
A selection of files within the ProjectSettings folder is defined and then copied to a new folder location. Each export variant exists as a folder with the required ProjectSettings files located within. These can then be swapped back into the master ProjectSettings as required.
The export tools can be used to write the settings defined in either Simple of Advanced mode at the point of running a shell or bash script that builds the project.

Note: the use of scripts is not required, the build options in Simple and Advanced mode provide tools for building the project directly in Unity.

Should I use the 'Simple' or 'Advanced' tools?
Simple mode copies the PlayerSettings data into a single asset file. These are easy to manage and are also readable/ editable from the Unity inspector.

In general, Simple mode will work best if the variations in exported projects are covered by the following:

–Product Name
–Company Name
–Version Number
–Bundle Identifier and Mac App Store validation
–Standalone Icons
–Build Scenes

Meanwhile advanced mode offers full flexibility for swapping between a selection (or all) of the ProjectSettings files. This works best for specific variations not covered above (e.g. different splash screens or different input managers).

The Interface
Save & Load (Simple mode)

Save to ExportSettings – Save basic Player settings and build scenes to an ExportSettings asset file. This file must be saved within the main project assets directory. To work correctly with the export tools, save all asset files within the same folder.

Load from ExportSettings – Load an ExportSettings profile back into the Player/ Build settings. Take care when using this option to ensure that replacing the current Player and Build settings is the desired action.
Build (Simple and Advanced mode)

The current project name and scene count are defined by the currently loaded Player settings. They should be edited either here or on an ExportSettings profile. An ExportSettings profile can also contain a Build Target Path, setting this value here allows different profiles to be associated with different paths. A custom path can also be set directly here.

The Build Target path supports both a full file path (e.g. /Users/{{username}}/Desktop/) or the use of a tilde (~) to substitute the home directory (e.g. ~/Desktop/)
These are Project settings that can be overridden at the point the project is built. When building a project and the ‘Use Overrides’ box is checked, the override options are applied to the main Player setting.
Standalone Config.
As when using the standard Unity tools, you must have the desired platform build support as part of your Unity install.

Select the desired build platforms and standalone options.

Auto Name File – the exported file name will automatically be set to match the name of the Unity project. If this is unchecked then a different file name can be specified.

Dev Build – creates a dev build of the project.

Auto Run Player – the built application runs once the build process completes. This assumes the target file is compatible with the operating system running Unity.

Folder To Split Platforms – this adds an extra file to the path named after the build target platform. E.g. ~/Desktop/ becomes ~/Desktop/Mac/ This is particularly useful when building for multiple platforms at once as it automatically creates an organised folder structure that is easy to navigate.

Exit Unity on Complete – close Unity once the build process completes
Build Project
At this point the build process begins. If overrides have been selected, these will be written to the main Player settings file. If the build in unable to run, an error message will be displayed.

Export Config.
This is where the file paths are specified for:

1) The ExportSettings files created in Simple mode
2) The sub-folders containing the ProjectSettings file copies made in advanced mode
3) The folder containing prepared export scripts (creating these is covered later)

With each folder selected an item can then be chosen from the corresponding dropdown. This lists applicable files/ folders found in the path location.

Refresh Dropdowns – if the folder contents is updated externally then press this button to view up-to-date results in Unity.

On Export
The profile and PlayerSettings that can be written on export are defined using the dropdown, this section is to confirm the actions that will take place when the Run Export button is pressed (and right before the script runs). In general you probably won’t want both these buttons ticked – you will either be applying a profile created in Simple mode, or moving back PlayerSettings copied in Advanced mode.

The overrides defined here are the same as those used when building a project. These will be written to PlayerSettings after the profile/ relevant folders have been copied to ensure that the values used here apply to the built project.

Running an Export
Note: for Simple and Advanced mode there is a 'Build Project' button that can be used to generate standalone builds at the press of a button. The below specifically applies to use of the 'Export Scripts' tab.

These options combine the profiles configured here with tools that run an export script (.bat or .sh) at the point the profile is applied.

Profiles Folder Path – this should be set to the folder where the ExportSettings asset files have been saved. Once configured the ‘Current Profile’ dropdown below can be used to select the profile that will be used when the export is run. At this point the settings in this profile will be written to the main Player/ Build settings.

When the ‘Use Overrides’ box is checked the values set here will be used instead of those in the ExportSettings asset file (if a profile is being written) or the Player settings (if not).

Profile To Use – read-only label confirming the profile that will be written into settings and used for the build.

Build Scripts Folder Path – for best results include all desired scripts within the same folder. With this folder defined here, the build script can be selected from the dropdown.

Script to Run – this is the script that will build the project from the command line. Within this script options such as build platform(s) can be defined.

Run Export – this writes the contents of the ExportSettings profile to the Player/ Build settings, applies any overrides and then runs the build script.