void Update()
        {
            if (building) {
                if (buildStatusEnumerator == null) {
                    AudienceNetworkBuild.SDKBuildCallback callback = delegate (bool success, string version, string message, string buildOutput, string buildError)
                    {
                        UnityEngine.Debug.Log("Build Complete for " + version + ".\nSuccess? " + success.ToString());
                        building = false;
                    };
                    IEnumerable<SDKBuildStatus> buildStatusEnumerable = AudienceNetworkBuild.RunSDKBuild(SdkVersion.Build, false,
                    callback);

                    buildStatusEnumerator = buildStatusEnumerable.GetEnumerator();
                }

                if (buildStatusEnumerator.MoveNext()) {
                    SDKBuildStatus buildStatus = buildStatusEnumerator.Current;
                    IList<string> logs = buildStatus.CurrentLogOutput;
                    if (logs.Count > 0) {
                        UnityEngine.Debug.Log(logs.Pop());
                    }

                    building &= buildStatus == null || buildStatus.BuildInProgress;
                }
            }
        }
 private void EndBuild()
 {
     building = false;
     if (buildStatusEnumerator != null && buildStatusEnumerator.MoveNext()) {
         SDKBuildStatus buildStatus = buildStatusEnumerator.Current;
         if (buildStatus != null && buildStatus.process != null) {
             KillProcess(buildStatus.process);
         }
         buildStatusEnumerator = null;
         UnityEngine.Debug.Log("Build cancelled.");
     }
 }