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

View File

@ -8,7 +8,7 @@ namespace Guru
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 ServicesConfigKey = "guru_services";
@ -49,6 +49,8 @@ namespace Guru
}
}
private static bool _isDebugEnabled = false;
/// <summary>
/// Debug Mode
/// </summary>
@ -59,7 +61,7 @@ namespace Guru
#if UNITY_EDITOR || DEBUG
return true;
#endif
return false;
return _isDebugEnabled;
}
}
@ -115,9 +117,10 @@ namespace Guru
Model.PropBLevel.OnValueChanged += OnBLevelChanged;
Model.PropBPlay.OnValueChanged += OnBPlayChanged;
IsInitialSuccess = false;
_initConfig = config;
_onCompleteCallback = onComplete;
IsInitialSuccess = false;
_isDebugEnabled = config.DebugMode;
//--- 之后的逻辑放在 Start 方法内 ---
}