Skip to main content

About the Unity Create Project Task

This task is used to create a new and empty project. This is e.g. useful for package development, where you want to have the pipeline validate a Unity package in multiple Unity versions in an empty project to make sure it builds as expected.

Syntax

# Unity Create Project V1
# Create a new project using Unity 6000.0.30f1 at the path /New Project/My Project/
- task: UnityCreateProjectTask@1
inputs:
version: '6000.0.30f1'
path: 'New Project'
projectName: 'My Project'

Inputs

version

The version of the Unity editor to work with and create the project with, e.g. 6000.0.30f1.

YAMLClassic EditorRequiredDefault
versionVersionYes-

path

Enter the path to create the Unity project at. If no value is entered, the root pipeline workspace is used.

YAMLClassic EditorRequiredDefault
pathPathNo-

projectName

The name of the Unity project created. The project name is also the name of the folder created for the project.

YAMLClassic EditorRequiredDefault
projectNameProject NameYesNew Project

unityEditorsPathMode

For the task to run successfully it needs to know where Unity installations are located at on the agent. This input lets you configure, where the task should look for installations.

YAMLClassic EditorRequiredDefault
unityEditorsPathModeUnity editors locationYesdefault

Options:

ValueDescription
defaultUses the Unity Hub default installation path
environmentVariableExpects an environment variable UNITYHUB_EDITORS_FOLDER_LOCATION to exist on the agent and specifying where to find editor installations.
specifyLet's you specify a custom path where to lookup editor installations using the input customUnityEditorsPath

customUnityEditorsPath

Should you have configured unityEditorsPathMode to specify, this input is used to read your custom path.

YAMLClassic EditorRequiredDefault
customUnityEditorsPathEditors folder locationYes, if unityEditorsPathMode is specify-

Output variables

This task defines the following output variables, which you can consume in downstream steps, jobs, and stages.

editorLogFilePath

Path to the Unity editor log file generated while executing the task.