private static void HandleCritical(VCCriticalException e) { Debug.LogException(e.InnerException != null ? e.InnerException : e); if (!string.IsNullOrEmpty(e.ErrorMessage)) { GoogleAnalytics.LogUserEvent("CriticalException", e.ErrorMessage); } var dialog = CustomDialogs.CreateExceptionDialog("UVC Critical Exception", e); dialog.AddButton("Turn UVC Off", () => { VCSettings.VCEnabled = false; dialog.Close(); }); dialog.ShowUtility(); EditorUtility.ClearProgressBar(); }
static AnalyticsEvents() { VCCommands.Instance.OperationCompleted += (operation, beforeStatus, afterStatus, success) => { GoogleAnalytics.LogUserEvent("Operation", string.Format("{0}_{1}", operation.ToString(), (success ? "success" : "failed"))); }; int dayOfYear = DateTime.Now.DayOfYear; int dayOfYearForLastSubmit = EditorPrefs.GetInt("UVCGA/DayOfLastSubmit", -1); if (dayOfYear != dayOfYearForLastSubmit) { EditorPrefs.SetInt("UVCGA/DayOfLastSubmit", dayOfYear); GoogleAnalytics.LogUserEvent("Project", PlayerSettings.productName.GetHashCode().ToString()); GoogleAnalytics.LogUserEvent("Version", VCUtility.GetCurrentVersion()); GoogleAnalytics.LogUserEvent("OS", Environment.OSVersion.Platform.ToString()); } }
private static void HandleBase(VCException e) { Debug.LogException(e.InnerException != null ? e.InnerException : e); if (!string.IsNullOrEmpty(e.ErrorMessage)) { GoogleAnalytics.LogUserEvent("Exception", e.ErrorMessage); } var dialog = CustomDialogs.CreateExceptionDialog("UVC Exception", e); if (VCSettings.BugReport) { dialog.AddButton("Report", () => ReportError(e)); } dialog.ShowUtility(); EditorUtility.ClearProgressBar(); }
public static bool CreateVersionControlCommands(VCSettings.EVersionControlBackend backend) { string workDirectory = Application.dataPath.Remove(Application.dataPath.LastIndexOf("/Assets", StringComparison.Ordinal)); bool noopSelected = backend == VCSettings.EVersionControlBackend.None; bool svnSelected = backend == VCSettings.EVersionControlBackend.Svn; /*P4_DISABLED bool p4Selected = backend == VCSettings.EVersionControlBackend.P4_Beta;*/ IVersionControlCommands uvc = null; bool success = false; if (svnSelected && CreateVersionControl <SVNCommands>(() => new SVNCommands(), workDirectory, out uvc)) { //D.Log(backend + " backend initialized successfully"); OnVersionControlBackendChanged(uvc); success = true; } /*P4_DISABLED * else if (p4Selected && CreateVersionControl<P4Commands>(() => new P4Commands(), workDirectory, out uvc)) * { * //D.Log(backend + " backend initialized successfully"); * OnVersionControlBackendChanged(uvc); * success = true; * }*/ else if (noopSelected) { //D.Log(backend + " backend initialized successfully"); OnVersionControlBackendChanged(GetDefaultImplementation()); success = true; } GoogleAnalytics.LogUserEvent("Backend", $"{backend.ToString()}_{(success ? "success" : "failed")}"); if (!success) { DebugLog.LogWarning(backend + " backend initialization failed!"); } return(success); }
public void Dispose() { watch.Stop(); GoogleAnalytics.LogUserEvent(category, action, (int)watch.ElapsedMilliseconds); }