|
|
|
|
|
|
using System; |
|
|
|
using UnityEditor; |
|
|
|
using UnityEngine; |
|
|
|
using UnityEditor.Build.Reporting; |
|
|
|
|
|
|
|
namespace MLAgents |
|
|
|
{ |
|
|
|
|
|
|
{ |
|
|
|
string[] scenes = { "Assets/ML-Agents/Examples/3DBall/Scenes/3DBall.unity" }; |
|
|
|
var error = BuildPipeline.BuildPlayer(scenes, "testPlayer", BuildTarget.StandaloneOSX, BuildOptions.None); |
|
|
|
if (string.IsNullOrEmpty(error)) |
|
|
|
var report = BuildPipeline.BuildPlayer(scenes, "testPlayer", BuildTarget.StandaloneOSX, BuildOptions.None); |
|
|
|
// if (string.IsNullOrEmpty(error))
|
|
|
|
if(report.summary.result == BuildResult.Succeeded) |
|
|
|
Console.Error.WriteLine(error); |
|
|
|
//Console.Error.WriteLine(error);
|
|
|
|
|
|
|
|
|
|
|
|
Debug.Log(error); |
|
|
|
//Debug.Log(error);
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |