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 static void BuildGUI()
 {
     try {
         string exportedPath = AudienceNetworkBuild.ExportPackage();
         EditorUtility.DisplayDialog(title, "Exported to " + exportedPath, "Okay");
     } catch (System.Exception e) {
         EditorUtility.DisplayDialog(title, e.Message, "Okay");
     }
 }
        private static void BuildGUI()
        {
            try {
                AudienceNetworkBuild.ExportPackage();
            } catch (System.Exception e) {
                EditorUtility.DisplayDialog(title, e.Message, "Okay");
            }

            EditorUtility.DisplayDialog(title, "Exported to ads/AudienceNetwork.unitypackage", "Okay");
        }