예제 #1
0
        private IEnumerator SubmitCo()
        {
            if (BugReportScreenshotUtil.ScreenshotData == null && Settings.Instance.EnableBugReportScreenshot)
            {
                if (TakingScreenshot != null)
                {
                    TakingScreenshot();
                }

                yield return(new WaitForEndOfFrame());

                yield return(StartCoroutine(BugReportScreenshotUtil.ScreenshotCaptureCo()));

                if (ScreenshotComplete != null)
                {
                    ScreenshotComplete();
                }
            }

            var s = SRServiceManager.GetService <IBugReportService>();

            var r = new BugReport();

            r.Email           = EmailField.text;
            r.UserDescription = DescriptionField.text;

            r.ConsoleLog        = Service.Console.AllEntries.ToList();
            r.SystemInformation = SRServiceManager.GetService <ISystemInformationService>().CreateReport();
            r.ScreenshotData    = BugReportScreenshotUtil.ScreenshotData;

            BugReportScreenshotUtil.ScreenshotData = null;

            s.SendBugReport(r, OnBugReportComplete, OnBugReportProgress);
        }
        private IEnumerator CaptureScreenshot()
        {
            BugReportScreenshotUtil.ScreenshotData = null;

            SRDebug.Instance.HideDebugPanel();

            yield return(BugReportScreenshotUtil.ScreenshotCaptureCo());

            SRDebug.Instance.ShowDebugPanel(false);
        }
예제 #3
0
        IEnumerator OpenCo(bool takeScreenshot, string descriptionText)
        {
            if (takeScreenshot)
            {
                // Wait for screenshot to be captured
                yield return(StartCoroutine(BugReportScreenshotUtil.ScreenshotCaptureCo()));
            }
            _popover.CachedGameObject.SetActive(true);

            yield return(new WaitForEndOfFrame());

            if (!string.IsNullOrEmpty(descriptionText))
            {
                _sheet.DescriptionField.text = descriptionText;
            }
        }