A tool for easy automating and customizing build process for Unity.
- Build target
- Build artifact is generated in
<project_dir>/build
directory or file.
- Build artifact is generated in
- Company name
- Product name
- Application identifier
- (Android) PackageName
- (iOS) BundleIdentifier
- Development build option(Development & Script debugging)
- Defined Symbols
- Enable/Disable scenes in build
- Exclude directory in build
- Application version
- Internal version
- (Android) BundleVersionCode
- (iOS) BuildNumber
- Compression options
- Build artifacts are generated in
<project_dir>/AssetBundles
directory - Copy to StreamingAssets directory
- Keystore infomation
- XCode modifier
- Languages
- Frameworks
- Services
- Entitlement file
- Signing & Provisioning profile
- Generate exportOptions.plist
- Unity5.3+ (included Unity 2017.x)
- No other SDK
- Download ProjectBuilder.unitypackage and install to your project.
- From the menu, click
Coffee
>Project Builder
- Input build configurations.
- Click
Buid
button to build application. - Build artifact is generated in
<project_dir>/build
directory or file.
-
The ProjectBuilder is accessible from the command line.
It is useful when using CI tools such as Jenkins. -
The following command option executes the build with the specified builder.
-batchmode -buildTarget <ios|android|webgl> -executeMethod Mobcast.Coffee.Build.ProjectBuilder.Build -builder <builder_name> [-devBuildNumber <number>] [-appendSymbols 'INCLUDE_SYMBOL;!EXCLUDE_SYMBOL;...'] [-override <builder_json>]
-
For example, The following command option executes the build for iOS with 'Develop_iOS' builder asset, with
DEBUG_MODE
symbol.
-batchmode -buildTarget ios -executeMethod Mobcast.Coffee.Build.ProjectBuilder.Build -builder 'Default iOS' -appendSymbols DEBUG_MODE
Note: DO NOT USE -quit
option.
For other infomation, see this link : https://docs.unity3d.com/Manual/CommandLineArguments.html
-override <builder_json>
to override builder setting. For example as following.
-override "{ \"applicationIdentifier\":\"com.test.app\", \"version\":\"1.1.0\", \"defineSymbols\":\"!DEVELOPMENT_BUILD;FAKE_PURCHASE\" }"
- Override application identifier to "com.test.app"
- Override version to '1.1.0'
- Disable symbol 'DEVELOPMENT_BUILD' and enable symbol 'FAKE_PURCHASE'
- To override other parameters, convert the builder to json from
Convert to JSON (console log)
in project builder window.
- Type
Mobcast.Coffee.Build.ProjectBuilder.PreExport
atConfig > Advanced Settings > Pre-Export Method Name
on UCB. - Builder asset used for building will be selected automatically based on build setting label.
For example, a build setting labeled 'Default iOS' on UCB, selects builder asset named 'Default iOS' in project.
- Click
Create Custom Project Builder Script
- Save script with dialog.
- Implement the script.
The serialized field is not only displayed in the inspector, it can also be used in PostProcessBuild as following.
[SerializeField] string stringParameter;
[PostProcessBuild]
protected static void OnPostProcessBuild(BuildTarget target, string path)
{
CustomProjectBuilder current = Util.currentBuilder as CustomProjectBuilder;
Debug.Log(current.stringParameter);
...
}
- Implement
IBuildTargetSettings
interface as following for build targets you need. - Add
System.Serializable
attribute to the class to be serializable.
[System.Serializable]
public class BuildTargetSettings_WebGL : IBuildTargetSettings
{
public BuildTarget buildTarget{get{ return BuildTarget.WebGL;}}
public Texture icon{get{ return EditorGUIUtility.FindTexture("BuildSettings.WebGL.Small");}}
public void Reset(){}
public void ApplySettings(ProjectBuilder builder){}
public void DrawSetting(SerializedObject serializedObject){}
}
- Add serialized field to
ProjectBuilder
orCustom ProjectBuilder
as following.
public BuildTargetSettings_WebGL webGlSettings = new BuildTargetSettings_WebGL();
- Feature: Override builder with json on command line.
- Feature: Memorize last selected builder each BuildTarget.
- Fixed:
Enable/Disable scenes in build
is not reflected.
- Fixed: When select file path not under project directory, value to be empty.
- Feature: Exclude directory in build.
- Feature: AssetBundle build report(Add/Delete/Update).
- Fixed: AssetBundle output path is incorrect.
- Fixed: Builder icon is not found.
- Fixed: Build target on edit multiple builder.
- Changed: Rename
IPlatformSettings
toIBuildTargetSettings
.
- Feature: New editor window instead of inspector window.
- Feature: Copy AssetBundles to StreamingAssets.
- Fixed: Build button for AssetBundle is not displayed.
- Feature: Build AssetBundle.
- Supports options.
- Build artifacts are generated in
<project_dir>/AssetBundles
directory.
- Fix: 'Usage For CUI' was corrected.
- Fix: Util.projectDir has error after compiling.
- Fix: (iOS) When 'Automatically Sign' is enabled, ignore 'Provisioning Profile Id', etc...
- Feature: Supports WebGL.
- Feature: Supports other platforms by implementing
IPlatformSettings
interface.
- Feature: Supports Unity Cloud Build.
- Feature: Enable/Disable scenes in build.
- Obsolete: Obsolete 'Custom build pipeline' to simplify.
- Obsolete: Obsolete 'Generate CUI command' and explain it in Readme instead.
- Obsolete: Several CUI command options.
- Obsolete: Several BuildOptions.
- Feature: (iOS) Supports language options for XCode.
- Feature: (iOS) Supports XCode 8 & Automatically Sign.
- Feature: (iOS) Add framework options.
- Feature: (iOS) Add entitlement file.
- Feature: (iOS) Apple servises (iCloud, Push, GameCenter, etc...) can be enable.
- Fix: Inspector GUI.
- Supports Unity5.5+.
- Improvement: Setting items are simplified. Several items have been deleted.
- Feature: Add button to 'Build & Run'.
- Feature: (iOS) Generate 'exportOptions.plist'.
- Fix: Generated CUI command is incorrect.
- Feature: Manage build configuration with builder asset.
- Feature: (Android) Keystore information.
- Feature: Custom build pipeline.
- Feature: Export
BUILD_VERSION
for CI.
- GitHub Page : https://github.com/mob-sakai/ProjectBuilder
- Issue tracker : https://github.com/mob-sakai/ProjectBuilder/issues