BuildPipeline.BuildPlayer Platform Settings

I’m trying to build my Unity3D project using the BuildPipeline.BuildPlayer() method, but I seem to be unable to force it to build for Windows 10, I’m only getting Windows 8.1 Players in the resulting directory structure.

My Build class call looks like this:
using UnityEngine;
using System.Collections;
using UnityEditor;

public class Build {

public static void AutomatedBuild()
{
string[ ] scenes = new string[ ] { @“Assets\scene1.unity” };
BuildPipeline.BuildPlayer(scenes, @“Build\Automated”, BuildTarget.WSAPlayer, BuildOptions.Development);
}
}

And I’m calling it from a command line with the following command:
Unity.exe -quit -batchmode -username “xxx” -password “yyy” -projectPath “PathToMyUnityProject” -executeMethod “Build.AutomatedBuild”

Is there some setting that I’m missing that would allow me to switch the target platform from Windows 8.1 to Windows 10?

You need to set this property http://docs.unity3d.com/ScriptReference/EditorUserBuildSettings-wsaSDK.html

1 Like