Esempio n. 1
0
        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());
            }
        }
Esempio n. 2
0
        private static void ReportError(VCException e)
        {
            if (VCSettings.BugReport)
            {
                string title       = Environment.UserName + "@" + Environment.MachineName + " : (" + VCUtility.GetCurrentVersion() + "):\n" + e.ErrorMessage;
                string description = "\n" + e.ErrorDetails;

                var conflicts =
                    VCCommands.Instance.GetFilteredAssets(
                        svnStatus =>
                        svnStatus.treeConflictStatus != VCTreeConflictStatus.Normal || svnStatus.fileStatus == VCFileStatus.Conflicted ||
                        svnStatus.fileStatus == VCFileStatus.Obstructed);

                if (conflicts != null && conflicts.Any())
                {
                    description += "\n\nSVN Conflicts:\n" + conflicts.Select(status => status.assetPath.Compose()).Aggregate((a, b) => a + "\n" + b);
                }

                FogbugzUtilities.SubmitAutoBug(title, description);
            }
        }