Beispiel #1
0
        public virtual int DisplayDialogComplex(string idForAnalytics, string title, string message, string ok, string cancel, string alt)
        {
            var result = EditorUtility.DisplayDialogComplex(title, message, ok, cancel, alt);

            PackageManagerDialogAnalytics.SendEvent(idForAnalytics, title, message, result == 1 ? cancel : (result == 2 ? alt : ok));
            return(result);
        }
Beispiel #2
0
        public virtual bool DisplayDialog(string idForAnalytics, string title, string message, string ok, string cancel = "")
        {
            var result = EditorUtility.DisplayDialog(title, message, ok, cancel);

            PackageManagerDialogAnalytics.SendEvent(idForAnalytics, title, message, result ? ok : cancel);
            return(result);
        }
        public static void SendEvent(string id, string title, string message, string userResponse)
        {
            var editorAnalyticsProxy = ServicesContainer.instance.Resolve <EditorAnalyticsProxy>();

            if (!editorAnalyticsProxy.RegisterEvent(k_EventName))
            {
                return;
            }

            var parameters = new PackageManagerDialogAnalytics
            {
                id            = id,
                title         = title,
                message       = message,
                user_response = userResponse
            };

            editorAnalyticsProxy.SendEventWithLimit(k_EventName, parameters);
        }