As Unity3d is multi-platform, you may need to install the proper third party OS & tools (Android SDK, XCode, etc) depending on the type of build targets you intend to exercise.
Install the latest version of the plugin from the update center and configure a freestyle job (see Usage Guide). If necessary restrict the job to the node(s) that will perform the build(s).
On the node(s) you are going to build Unity projects, add at least one unity3d installation (Manage Jenkins -> Configure System) and configure the location of the Unity3d installation. This location is by default /Applications/Unity/Unity.app on Mac OS X and C:\Program Files (x86)\Unity on Windows. The plugin will automatically suffix the installation path with the proper executable location.
The plugin assumes you've created a special Editor class with at least one method responsible for your build.
Here's an example extracted from one of our projects:
On Mac OS X, the user running needs to be logged in otherwise the Unity3d editor might fail to acquire the graphical resources. FIXME add a log.
The Unity Editor can only perform one build at a time. If you have multiple job, you may want to prevent more than one Unity jobs to be running at the single time. One simple way to achieve this is to have a single Executor on your build server node. This has of course drawbacks if you intend to run other types of jobs on the same node that are not affected by the same limitation.
Add the Unity3d build step to a free-style project, select the unity3d installation and set your command line arguments (e.g. -quit -batchmode -executeMethod MyEditorScript.PerformMacOSXBuild). If you do not specify -projectPath (case-sensitive), the plugin will use the current workspace. You may want to add an extra step to clean the project before you build to make sure the build starts in a clean state.
If you want to build for iOS, you will have to add extra build steps to trigger xcode build. This step isn't covered here.
To automatically install unity3d from jenkins (even beta versions)
Skip to end of metadata Go to start of metadata