static SVGImporterLaunchEditor() { if(launched) { return; } else { launched = true; } initCall = new DelayedCall(DelayedInit); if (EditorPrefs.HasKey(SVG_IMPORTER_WINDOW_PREF_KEY)) { _active = EditorPrefs.GetBool(SVG_IMPORTER_WINDOW_PREF_KEY); } else { _active = true; } HideGizmos(); SVGPostprocessor.Init(); UpdateDelegates(); Analytics.TrackEvent("Start App, Version: "+SVGImporterSettings.version, "app/start"); EditorCoroutine.StartCoroutine(initCall.Delay(0.5f), initCall); }
internal static void TrackEvent(string title, string eventValue) { GetLocalIPAddressString(); if (ipAdress != null) { string request = "http://in.getclicky.com/in.php?" + "site_id=" + ClickySiteID + //click site id , found in preferences "&sitekey_admin=" + ClickySiteAdminKey + //clicky site admin key, found in preferences "&ip_address=" + ipAdress + //ip address of the user - used for mapping action trails "&type=custom" + "&href=" + "/" + eventValue.Replace(" ", "_") + //string that contains whatever event you want to track/log "&title=" + UnityEngine.WWW.EscapeURL(title) + "&type=click"; wwwCall = new DelayedCall(); EditorCoroutine.StartCoroutine(wwwCall.WWW(request), wwwCall); } }
internal static string GetLocalIPAddressString() { if (ipAdress == null) { wwwIPCall = new DelayedCall(); wwwIPCall.wwwCallback = delegate(WWW obj) { if (!string.IsNullOrEmpty(obj.text)) { EditorPrefs.SetString(LAST_IP_ADDRESS_KEY, ipAdress); ipAdress = obj.text; } }; EditorCoroutine.StartCoroutine(wwwIPCall.WWW("https://api.ipify.org"), wwwIPCall); if (EditorPrefs.HasKey(LAST_IP_ADDRESS_KEY)) { return(EditorPrefs.GetString(LAST_IP_ADDRESS_KEY)); } } return(ipAdress); }
internal static string GetLocalIPAddressString() { if(ipAdress == null) { wwwIPCall = new DelayedCall(); wwwIPCall.wwwCallback = delegate(WWW obj) { if(!string.IsNullOrEmpty(obj.text)) { EditorPrefs.SetString(LAST_IP_ADDRESS_KEY, ipAdress); ipAdress = obj.text; } }; EditorCoroutine.StartCoroutine(wwwIPCall.WWW("https://api.ipify.org"), wwwIPCall); if(EditorPrefs.HasKey(LAST_IP_ADDRESS_KEY)) { return EditorPrefs.GetString(LAST_IP_ADDRESS_KEY); } } return ipAdress; }
internal static void TrackEvent(string title, string eventValue) { GetLocalIPAddressString(); if(ipAdress != null) { string request = "http://in.getclicky.com/in.php?" + "site_id=" + ClickySiteID + //click site id , found in preferences "&sitekey_admin=" + ClickySiteAdminKey + //clicky site admin key, found in preferences "&ip_address=" + ipAdress + //ip address of the user - used for mapping action trails "&type=custom" + "&href=" + "/"+eventValue.Replace(" ", "_") + //string that contains whatever event you want to track/log "&title="+UnityEngine.WWW.EscapeURL(title)+ "&type=click"; wwwCall = new DelayedCall(); EditorCoroutine.StartCoroutine(wwwCall.WWW(request), wwwCall); } }