コード例 #1
0
        private static void SendPlayModeEvent(BaseData data)
        {
            if (!EnableAnalytics())
            {
                return;
            }

            EditorAnalytics.SendEventWithLimit(k_EventName, data);
        }
コード例 #2
0
        public static void SendSaveLoadEvent(ProfilerAnalyticsSaveLoadData data)
        {
            if (!EditorAnalytics.enabled)
            {
                return;
            }

            if (!profilerSaveLoadRegistered)
            {
                profilerSaveLoadRegistered = RegisterEvent(k_ProfilerSaveLoad);
            }

            EditorAnalytics.SendEventWithLimit(k_ProfilerSaveLoad, data);
        }
コード例 #3
0
        public static void StopCapture()
        {
            if (!Capturing)
            {
                return;
            }
            if (!EditorAnalytics.enabled)
            {
                return;
            }
            Capturing = false;

            if (!profilerCaptureRegistered)
            {
                profilerCaptureRegistered = RegisterEvent(k_ProfilerCapture);
            }

            EditorAnalytics.SendEventWithLimit(k_ProfilerCapture, Capture);
        }
コード例 #4
0
        public static void SendConnectionEvent(ProfilerAnalyticsConnectionData data)
        {
            if (!EditorAnalytics.enabled)
            {
                return;
            }

            if (data.success)
            {
                data.connectionDetail = ProfilerDriver.GetConnectionIdentifier(ProfilerDriver.connectedProfiler);
            }

            if (!profilerConnectionRegistered)
            {
                profilerConnectionRegistered = RegisterEvent(k_ProfilerConnection);
            }

            EditorAnalytics.SendEventWithLimit(k_ProfilerConnection, data);
        }
コード例 #5
0
        public static void OnProfilerWindowDestroy()
        {
            ProfilerSession.time = EditorApplication.timeSinceStartup - ProfilerSession.time;
            if (!EditorAnalytics.enabled)
            {
                return;
            }

            if (!profilerElementUsabilityRegistered)
            {
                profilerElementUsabilityRegistered = RegisterEvent(k_ProfilerElementUsability);
            }

            // no interaction during session
            if (ProfilerSession.keyboardEvents == 0 && ProfilerSession.mouseEvents == 0)
            {
                return;
            }

            SwitchActiveView(CurrentView.element);
            ProfilerSession.session = Views.ToArray();

            EditorAnalytics.SendEventWithLimit(k_ProfilerElementUsability, ProfilerSession);
        }