From 0770fc8d5bda97c16d2cb1e306879b1edbd3efc0 Mon Sep 17 00:00:00 2001 From: Victor Nunes Date: Wed, 23 Mar 2022 10:29:05 -0300 Subject: [PATCH] Remove session load from GA A/B in editor --- Assets/NanoSauce/Analytics/NanoSauceGA.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/NanoSauce/Analytics/NanoSauceGA.cs b/Assets/NanoSauce/Analytics/NanoSauceGA.cs index bae7026..1a7f1ac 100644 --- a/Assets/NanoSauce/Analytics/NanoSauceGA.cs +++ b/Assets/NanoSauce/Analytics/NanoSauceGA.cs @@ -83,6 +83,12 @@ internal void RegisterDesignEvent(string eventString, float eventFloatValue = fl private void LoadLastCustomDimension() { + #if UNITY_EDITOR + + return; // Don`t want editor to load last session dimension value. + + #endif + if (PlayerPrefs.HasKey(CUSTOM_DIMENSION_SAVE_KEY)) currentCustomDimension = PlayerPrefs.GetString(CUSTOM_DIMENSION_SAVE_KEY); }