public void Equivocacion() { incorrect.gameObject.SetActive(true); punRojo.gameObject.SetActive(true); AnalyticsResult result = Analytics.CustomEvent("Equivocacion"); Debug.Log("Analytics result: " + result); //System.Threading.Thread.Sleep(3000); //incorrect.gameObject.SetActive(false); }
public void ReportSecretFound(int secretID) { AnalyticsResult result = Analytics.CustomEvent("secret_found", new Dictionary <string, object> { { "secret_id", secretID }, { "time_elapsed", Time.timeSinceLevelLoad }, { "time_now", DateTime.Now } }); print(result); }
private void Awake() { Instance = this; startTime = Time.time; bestScore = PlayerPrefs.GetInt(bestScoreName, 0); UpdateBestScoreUI?.Invoke(bestScore); UpdateLifesUI?.Invoke(lifes); player.GetComponent <PlayerController>().jumpHeight = UnityEngine.RemoteSettings.GetFloat("jumpHeight"); AnalyticsResult result = Analytics.CustomEvent("NewGame"); }
public void SetTiempoExperto() { SelFacil.gameObject.SetActive(false); SelMedio.gameObject.SetActive(false); SelDificil.gameObject.SetActive(false); SelExperto.gameObject.SetActive(true); AnalyticsResult result = Analytics.CustomEvent("DifExperto"); Debug.Log("Analytics result: " + result); }
static bool EnableAnalytics() { AnalyticsResult result = EditorAnalytics.RegisterEventWithLimit(k_EventName, k_MaxEventsPerHour, k_MaxNumberOfElements, k_VendorKey); if (result == AnalyticsResult.Ok) { s_EventRegistered = true; } return(s_EventRegistered); }
public static AnalyticsResult SocialShareAccept( string shareType, string socialNetwork, string senderId = null, string recipientId = null, IDictionary <string, object> eventData = null) { AnalyticsResult analyticsResult = new AnalyticsResult(); return(analyticsResult); }
public void inicio() { SceneManager.LoadScene("Principal", LoadSceneMode.Single); usuario.gameObject.SetActive(false); contexto.gameObject.SetActive(false); AnalyticsResult result = Analytics.CustomEvent("Jugar"); Debug.Log("Analytics result: " + result); }
private void OnTriggerEnter2D(Collider2D collider) { if (collider.GetComponent <PlayerControl>() != null) { townNumber = townNumber + 1; GameControl.instance.hitNewTown(); ReportTownReach(townNumber); AnalyticsResult ar = Analytics.CustomEvent("town_reach"); Debug.Log("Result = " + ar.ToString()); } }
private void ReportLevelStart(Argument argumentNotUsed, ArgumentRange range) { m_LevelIndex = range.current; AnalyticsResult result = AnalyticsEvent.LevelStart(range.current); Debug.Assert(result == AnalyticsResult.Ok, "ReportLevel: result=" + result + " levelIndex=" + range.current, context: this ); }
//Returns true if registering the event was successful private static bool RegisterEvent() { AnalyticsResult registerEvent = EditorAnalytics.RegisterEventWithLimit(EventName, 100, 100, VendorKey); if (registerEvent == AnalyticsResult.Ok) { _eventRegistered = true; } return(_eventRegistered); }
static bool RegisterEvent(string name) { AnalyticsResult result = EditorAnalytics.RegisterEventWithLimit(name, MaxEventsPerHour, MaxNumberOfElements, VendorKey); if (result != AnalyticsResult.Ok) { DebugError("Error in RegisterEvent: {0}", result); return(false); } return(true); }
public void Acierto() { correct.gameObject.SetActive(true); PunVerde.gameObject.SetActive(true); AnalyticsResult result = Analytics.CustomEvent("Acierto"); Debug.Log("Analytics result: " + result); //System.Threading.Thread.Sleep(3000); //correct.gameObject.SetActive(false); }
public static bool SendUIVisibilityEvent(UIVisibility uiVisibility, float durationInSeconds, bool show) { if (!s_EnableAnalytics) { return(false); } #if UNITY_2018_1_OR_NEWER // Duration is in "ticks" 100 nanosecond intervals. I.e. 0.1 microseconds float durationInTicks = SecondsToTicks(durationInSeconds); ProfileAnalyzerUIVisibilityEvent uiUsageEvent; switch (uiVisibility) { case UIVisibility.FrameTimeContextMenu: uiUsageEvent = new ProfileAnalyzerUIVisibilityEvent("profilerAnalyzerFrameTimeContextMenu", durationInTicks, show); break; case UIVisibility.Filters: uiUsageEvent = new ProfileAnalyzerUIVisibilityEvent("profilerAnalyzerFilters", durationInTicks, show); break; case UIVisibility.TopTen: uiUsageEvent = new ProfileAnalyzerUIVisibilityEvent("profilerAnalyzerTopTen", durationInTicks, show); break; case UIVisibility.Frames: uiUsageEvent = new ProfileAnalyzerUIVisibilityEvent("profilerAnalyzerFrames", durationInTicks, show); break; case UIVisibility.Threads: uiUsageEvent = new ProfileAnalyzerUIVisibilityEvent("profilerAnalyzerThreads", durationInTicks, show); break; case UIVisibility.Markers: uiUsageEvent = new ProfileAnalyzerUIVisibilityEvent("profilerAnalyzerMarkers", durationInTicks, show); break; default: Debug.LogFormat("SendUIVisibilityEvent: Unsupported visibililty item : {0}", uiVisibility); return(false); } AnalyticsResult result = EditorAnalytics.SendEventWithLimit(k_EventTopicName, uiUsageEvent); if (result != AnalyticsResult.Ok) { return(false); } return(true); #else return(false); #endif }
private void QuitLevel() { //Analytics.CustomEvent("GameQuit" + PlayerPrefs.GetInt("levelAt")); AnalyticsResult analyticsResult = Analytics.CustomEvent( "GameQuit", new Dictionary <string, object> { { "Level: ", PlayerPrefs.GetInt("levelAt") + 1 } } ); }
// Start is called before the first frame update void Start() { //Reference the player click tracker in the scene ct = GameObject.Find("Click Tracker").GetComponent <ClickTracker>(); //Parameter : total_clicks, represents the total number of mouse click action in the game //This is a standard unity analytics event with additional parameter AnalyticsResult result = AnalyticsEvent.LevelComplete("acorner_level", new Dictionary <string, object> { { "total_clicks", ct.totalClicks } }); //Debug.Log("Level complete event " + result); }
public override void OnEnter() { AnalyticsResult _result = Analytics.SetUserId(userId.Value); if (!result.IsNone) { result.Value = _result; } Fsm.Event(_result == AnalyticsResult.Ok?success:failure); Finish(); }
bool CheckResult(AnalyticsResult result, string prefix) { switch (result) { case AnalyticsResult.Ok: return(true); default: Debug.LogErrorFormat("AnalyticsUnity.{0} bad result: {1}", prefix, result); return(false); } }
private static AnalyticsResult CustomEvent(string name, IDictionary <string, object> data) { data.Add("build_version", buildVersion); data.Add("plugin_version", pluginVersion); AnalyticsResult analyticsResult = Analytics.CustomEvent(name, data); if (analyticsResult != 0) { UnityEngine.Debug.LogErrorFormat("An error occured when attempting to submit custom event '{0}' ({1}).", name, analyticsResult); } return(analyticsResult); }
public static AnalyticsResult IAPTransaction( string transactionContext, float price, string itemId, string itemType = null, string level = null, string transactionId = null, IDictionary <string, object> eventData = null) { AnalyticsResult analyticsResult = new AnalyticsResult(); return(analyticsResult); }
static bool RegisterEvent() { #if UNITY_EDITOR AnalyticsResult result = EditorAnalytics.RegisterEventWithLimit(k_EventName, k_MaxEventsPerHour, k_MaxNumberOfElements, k_VendorKey, k_VersionId); #else // IF !UNITY_EDITOR AnalyticsResult result = Analytics.RegisterEvent(k_EventName, k_MaxEventsPerHour, k_MaxNumberOfElements, k_VendorKey, k_VersionId); #endif bool isResultOk = result == AnalyticsResult.Ok; return(isResultOk); }
public void resetScoreScreen() { Dictionary <string, object> dNight = new Dictionary <string, object>(); dNight.Add("Night", Night); AnalyticsResult result = Analytics.CustomEvent("Night Completed", dNight); Debug.Log(result); scoreScreen.gameObject.SetActive(false); whiteSugarEarned = 0; Night++; updateText(); }
// Return to home screen public void Home() { // Analytics Log: level where player exits AnalyticsResult exitAnalytics = Analytics.CustomEvent( "LevelExit", new Dictionary <string, object> { { "Level", SceneManager.GetActiveScene().buildIndex - 1 }, }); // Debug: analytics Debug.Log("CustomEvent LevelExit sent: " + exitAnalytics); SceneManager.LoadScene(levelScreenIndex); }
/***Uniy Analytics***/ public void DispatchFirstTreeHitEvent() { if (!treeHit) { treeHit = true; //Parameter : time_elapsed, represents the time spent in the level before the player fisrt time hit the tree with branch AnalyticsResult result = AnalyticsEvent.Custom("Tree_Hit_with_Branch", new Dictionary <string, object> { { "time_elapsed", Time.timeSinceLevelLoad } }); //Debug.Log("First tree hit event " + result); } }
public void Open() { // Analytics Log: level open AnalyticsResult openAnalytics = Analytics.CustomEvent( "LevelOpen", new Dictionary <string, object> { { "Level", level } } ); Debug.Log("CustomEvent LevelOpen sent: " + openAnalytics); SceneManager.LoadScene(level + 1); }
public void QuitGame() { AnalyticsResult ana = Analytics.CustomEvent( scene.name, new Dictionary <string, object> { { "PlayerPlayTime", Time.time }, { "LevelPlayerStop", scene.name } } ); Debug.Log("Quit Game..."); Application.Quit(); }
public void SendGameStart(MainGameData gameData) { GameId = Guid.NewGuid().ToString(); AnalyticsResult analyticsResult = Analytics.CustomEvent(Constants.Analytics.Events.GameStart, new Dictionary <string, object> { { Constants.Analytics.Parameters.User, PlayerGuid }, { Constants.Analytics.Parameters.AppVersion, appVersion }, { Constants.Analytics.Parameters.GameId, GameId }, { Constants.Analytics.Parameters.GameLevel, gameData.Ruleset.Id } }); DebugLog($"[ANALYTICS] [{analyticsResult}] {Constants.Analytics.Events.GameStart}: {gameData.Ruleset.Id}"); }
// Click procs public void callNumber(string Number) { if (menuMover.IsCancelNextMenu()) { return; } #if !UNITY_EDITOR AnalyticsResult res = Analytics.CustomEvent("userCall", new Dictionary <string, object> { { "callOrg", menuSets[currSubMenuSetIndex].Title.text } }); Debug.Log("Event: userCall: " + res.ToString()); Application.OpenURL("tel:" + Number); #endif }
public void Restart() { // Analytics - Replay Level // AnalyticsResult result = AnalyticsEvent.Custom("Replay_Level", new Dictionary <string, object> { { "position_x", playerEntity.transform.position.x }, { "position_y", playerEntity.transform.position.y }, { "level_id", currentLevel } }); currentLevel = currentLevel - 1; FadeToNextLevel(); }
public static void CustomEvent(string customEventName) { if (!Analytics.enabled) { return; } AnalyticsResult result = Analytics.CustomEvent(customEventName); if (DebugResult) { Debug.Log(string.Format("{0} - {1}", customEventName, result)); } }
public void WhenRestarted(string title) { if (SessionManager.Consent) { Dictionary <string, object> restartInfo = new Dictionary <string, object>(); restartInfo.Add("SessionID", SessionManager.SessionId); restartInfo.Add("DuringGameTitle", title); AnalyticsResult ar = Analytics.CustomEvent("RESTART_INFO", restartInfo); Debug.Log("Result = " + ar.ToString()); } }