update: 更新 GuruSDK 的标记位

feature/item_system
胡宇飞 2024-01-17 20:46:23 +08:00
parent fc53efbca3
commit 8b0e86a5f3
2 changed files with 13 additions and 10 deletions

View File

@ -24,9 +24,9 @@ namespace Guru
/// </summary> /// </summary>
public bool AutoRecordFinishedLevels = true; public bool AutoRecordFinishedLevels = true;
/// <summary> /// <summary>
/// 显示Debug日志 /// Debug模式默认关闭
/// </summary> /// </summary>
public bool ShowDebugLog = false; public bool DebugMode = false;
/// <summary> /// <summary>
/// 云控参数的默认配置 /// 云控参数的默认配置
/// </summary> /// </summary>
@ -62,13 +62,13 @@ namespace Guru
AutoLoadWhenAdsReady = autoLoadAds, AutoLoadWhenAdsReady = autoLoadAds,
IAPEnabled = iapEnabled, IAPEnabled = iapEnabled,
AutoRecordFinishedLevels = autoRecordFinishedLevels, AutoRecordFinishedLevels = autoRecordFinishedLevels,
ShowDebugLog = showDebugLog, DebugMode = showDebugLog,
GoogleKeys = googleKeys, GoogleKeys = googleKeys,
AppleRootCerts = appleRootCerts, AppleRootCerts = appleRootCerts,
DefaultRemoteData = defaultRemoteData ?? new Dictionary<string, object>(), DefaultRemoteData = defaultRemoteData ?? new Dictionary<string, object>(),
}; };
#if UNITY_EDITOR #if UNITY_EDITOR
config.ShowDebugLog = true; config.DebugMode = true;
#endif #endif
return config; return config;
} }
@ -85,7 +85,7 @@ namespace Guru
sb.AppendLine($"\tUseCustomConsent: {UseCustomConsent}"); sb.AppendLine($"\tUseCustomConsent: {UseCustomConsent}");
sb.AppendLine($"\tAutoLoadWhenAdsReady: {AutoLoadWhenAdsReady}"); sb.AppendLine($"\tAutoLoadWhenAdsReady: {AutoLoadWhenAdsReady}");
sb.AppendLine($"\tIAPEnabled: {IAPEnabled}"); sb.AppendLine($"\tIAPEnabled: {IAPEnabled}");
sb.AppendLine($"\tShowDebugLog: {ShowDebugLog}"); sb.AppendLine($"\tShowDebugLog: {DebugMode}");
sb.AppendLine($"------- Custom init Config -------"); sb.AppendLine($"------- Custom init Config -------");
return sb.ToString(); return sb.ToString();
} }

View File

@ -8,7 +8,7 @@ namespace Guru
public partial class GuruSDK: MonoBehaviour public partial class GuruSDK: MonoBehaviour
{ {
public const string Version = "1.0.0"; public const string Version = "1.0.4";
public const string Tag = "[Guru]"; public const string Tag = "[Guru]";
public const string ServicesConfigKey = "guru_services"; public const string ServicesConfigKey = "guru_services";
@ -49,6 +49,8 @@ namespace Guru
} }
} }
private static bool _isDebugEnabled = false;
/// <summary> /// <summary>
/// Debug Mode /// Debug Mode
/// </summary> /// </summary>
@ -59,7 +61,7 @@ namespace Guru
#if UNITY_EDITOR || DEBUG #if UNITY_EDITOR || DEBUG
return true; return true;
#endif #endif
return false; return _isDebugEnabled;
} }
} }
@ -115,9 +117,10 @@ namespace Guru
Model.PropBLevel.OnValueChanged += OnBLevelChanged; Model.PropBLevel.OnValueChanged += OnBLevelChanged;
Model.PropBPlay.OnValueChanged += OnBPlayChanged; Model.PropBPlay.OnValueChanged += OnBPlayChanged;
IsInitialSuccess = false;
_initConfig = config; _initConfig = config;
_onCompleteCallback = onComplete; _onCompleteCallback = onComplete;
IsInitialSuccess = false; _isDebugEnabled = config.DebugMode;
//--- 之后的逻辑放在 Start 方法内 --- //--- 之后的逻辑放在 Start 方法内 ---
} }