Unity windows build exit before asset import
Hi All!
I am trying to do a command line build on a windows server. When I run the same command line from mac os, no issue. When running the command on windows build server, the build exits without error but I do not get any build output, even though I have added exceptions in the build script. The log below is from trying to build from an empty scene. I am wondering what may cause build to exit early like this?
Please see build output below:
LICENSE SYSTEM [2019119 17:37:59] Next license update check is after 2019-11-06T00:34:54
Built from '2019.1/staging' branch; Version is '2019.1.7f1 (f3c4928e5742) revision 15975570'; Using compiler version '191627012'
OS: 'Windows 10 (10.0.0) 64bit' Language: 'en' Physical Memory: 40956 MB
BatchMode: 1, IsHumanControllingUs: 0, StartBugReporterOnCrash: 0, Is64bit: 1, IsPro: 1
[Package Manager] Server::Start -- Port 60199 was selected
COMMAND LINE ARGUMENTS:
C:\my_unity_path\Unity2019.1.7f1\Editor\Unity.exe
-nographics
-batchmode
-logfile
build.log
-projectPath
C:\my_project_path/test_project
-executeMethod
Build.BuildAndroid
-quit
Successfully changed project path to: C:\my_project_path/test_project
C:\my_project_path/test_project
Using Asset Import Pipeline V1.
DisplayProgressbar: Unity Package Manager
Build Script I was using:
using System;
using System.Linq;
using UnityEditor;
public class Build
{
static string[] GetScenePaths()
{
string[] scenes = new string[EditorBuildSettings.scenes.Length];
for (int i = 0; i < scenes.Length; i++)
{
scenes[i] = EditorBuildSettings.scenes[i].path;
}
return scenes;
}
public static void BuildAndroid()
{
// Find the prefs here
// defaults read ~/Library/Preferences/com.unity3d.UnityEditor5.x.plist
EditorPrefs.SetString("AndroidSDKRoot", "C:/android_sdk");
EditorPrefs.SetInt("SdkUseEmbedded", 0);
EditorPrefs.SetString("AndroidNdkRootR16b", "C:/android-ndk-r16b");
EditorPrefs.SetInt("NdkUseEmbedded", 0);
PlayerSettings.Android.bundleVersionCode = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
string error = BuildPipeline.BuildPlayer(GetScenePaths(), "
Builds", BuildTarget.Android, BuildOptions.AcceptExternalModificationsToPlayer);
if (string.IsNullOrEmpty( error ))
{
throw new System.Exception( "Error occurred during build:" + error);
}
}
It appears to me the build exited without error before asset gets imported. Any advice and suggestions are welcome. Thank you all for your time.
Your answer
Follow this Question
Related Questions
Running shell scripts Mac: POST BUILD -1 Answers
Android build error 1 Answer
Native audio plugin xcode build problem "undefined symbols" 0 Answers
converting managed assemblies to c++ building to ios and unity crashes 1 Answer
What happened with my game's colors after building? please help me... 0 Answers