How to create Development(Debug) build with command line.

“S:\Unity4.6Beta\Editor\Unity.exe” -batchmode -buildWindowsPlayer S:/Test.exe is bypassing my Editor settings for Development build with Debug mode. Anyone know how to build Development build with command line?

I found a solution! Create a new class that will call BuildPipeline.BuildPlayer. It would look like this:

using UnityEditor;
using System.Collections.Generic;
using System.Linq;

public class MyBuilder
    private static string[] EnabledLevels()
        return (from scene in EditorBuildSettings.scenes where scene.enabled select scene.path).ToArray();

    public static void DevelopmentBuild()
        BuildPipeline.BuildPlayer(EnabledLevels(), "Game.exe", BuildTarget.StandaloneWindows, BuildOptions.Development);


Then, call MyBuilder.DevelopmentBuild() method from the command line:

Unity.exe -batchmode -quit -executeMethod MyBuilder.DevelopmentBuild

Just in case anyone runs into this issue, you can add the following calls to your build pipeline to spit out a development build:

EditorUserBuildSettings.development = true;
EditorUserBuildSettings.allowDebugging = true;
EditorUserBuildSettings.connectProfiler = true;

Enable “Development build” and “Show console” in build settings tab in the editor. Pretty sure that’s what you are looking for.