From 135a0ac23b2279df8dec420db5604bb1defa59a4 Mon Sep 17 00:00:00 2001 From: huyfei Date: Sun, 4 Feb 2024 16:40:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20ABTestManager=20?= =?UTF-8?q?=E7=9A=84=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runtime/ABTest/ABTestManager.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Runtime/ABTest/ABTestManager.cs b/Runtime/ABTest/ABTestManager.cs index 64a7432..97c82e1 100644 --- a/Runtime/ABTest/ABTestManager.cs +++ b/Runtime/ABTest/ABTestManager.cs @@ -1,10 +1,11 @@ namespace Guru { + using System.Linq; using System; using System.Collections.Generic; using Firebase.RemoteConfig; - using Guru.LitJson; + using Newtonsoft.Json; using UnityEngine; /// @@ -12,7 +13,7 @@ namespace Guru /// public class ABTestManager : Singleton { - public const string Version = "1.0.0"; + public const string Version = "1.0.2"; private FirebaseRemoteConfig _remoteConfig; private List _params; @@ -51,10 +52,13 @@ namespace Guru _remoteConfig = FirebaseRemoteConfig.DefaultInstance; + Debug.Log($"[AB] --- remoteConfig Counts: {_remoteConfig.Keys.Count()}"); + string strValue; foreach (var key in _remoteConfig.Keys) { strValue = _remoteConfig.GetValue(key).StringValue; + Debug.Log($"[AB] --- raw config: [{key}] : {strValue}"); AddParam(strValue); } @@ -135,7 +139,8 @@ namespace Guru try { // 发现Guru AB测试标志位 - var dict = JsonMapper.ToObject>(value); + // var dict = JsonMapper.ToObject>(value); + var dict = JsonConvert.DeserializeObject>(value); if (null != dict) { foreach (var k in dict.Keys)