diff --git a/Module/Advertising/Runtime/General/Advertising.cs b/Module/Advertising/Runtime/General/Advertising.cs index 4bfb6cc..45aec7d 100644 --- a/Module/Advertising/Runtime/General/Advertising.cs +++ b/Module/Advertising/Runtime/General/Advertising.cs @@ -12,6 +12,7 @@ #endif using UnityEngine; using VirtueSky.Inspector; +using VirtueSky.Misc; namespace VirtueSky.Ads { @@ -95,7 +96,7 @@ void InitAdClient() currentAdClient.SetupAdSettings(adSettings); currentAdClient.Initialize(); - Debug.Log("currentAdClient: " + currentAdClient); + Debug.Log($"currentAdClient: {currentAdClient}".SetColor(Color.cyan)); isInitAdClient = true; InitAutoLoadAds(); } diff --git a/Module/RemoteConfig/Runtime/FirebaseRemoteConfigData.cs b/Module/RemoteConfig/Runtime/FirebaseRemoteConfigData.cs index a32fbe7..2223c91 100644 --- a/Module/RemoteConfig/Runtime/FirebaseRemoteConfigData.cs +++ b/Module/RemoteConfig/Runtime/FirebaseRemoteConfigData.cs @@ -7,6 +7,7 @@ using UnityEngine; using VirtueSky.DataStorage; using VirtueSky.Inspector; +using VirtueSky.Misc; namespace VirtueSky.RemoteConfigs { @@ -62,7 +63,7 @@ public void SetupData(ConfigValue result) } resultValueString = GameData.Get(key); - Debug.Log($"{key}: {resultValueString}"); + Debug.Log($"{key}: {resultValueString}".SetColor(Color.green)); break; case TypeRemoteConfigData.BooleanData: if (result.Source == ValueSource.RemoteValue) @@ -71,7 +72,7 @@ public void SetupData(ConfigValue result) } resultValueBool = GameData.Get(key); - Debug.Log($"{key}: {resultValueBool}"); + Debug.Log($"{key}: {resultValueBool}".SetColor(Color.green)); break; case TypeRemoteConfigData.IntData: if (result.Source == ValueSource.RemoteValue) @@ -80,7 +81,7 @@ public void SetupData(ConfigValue result) } resultValueInt = GameData.Get(key); - Debug.Log($"{key}: {resultValueInt}"); + Debug.Log($"{key}: {resultValueInt}".SetColor(Color.green)); break; } } diff --git a/Module/RemoteConfig/Runtime/FirebaseRemoteConfigManager.cs b/Module/RemoteConfig/Runtime/FirebaseRemoteConfigManager.cs index 3683a1b..82fc588 100644 --- a/Module/RemoteConfig/Runtime/FirebaseRemoteConfigManager.cs +++ b/Module/RemoteConfig/Runtime/FirebaseRemoteConfigManager.cs @@ -6,6 +6,8 @@ using UnityEngine; using VirtueSky.Core; using VirtueSky.Inspector; +using VirtueSky.Misc; +using VirtueSky.Utils; #if UNITY_EDITOR using VirtueSky.UtilsEditor; @@ -42,7 +44,7 @@ public static bool FirebaseDependencyAvailable get { #if VIRTUESKY_FIREBASE - return ins.dependencyStatus == DependencyStatus.Available; + return ins.dependencyStatus == DependencyStatus.Available; #else return false; #endif @@ -103,8 +105,7 @@ private void Init() } else { - Debug.LogError("Could not resolve all Firebase dependencies: " + - dependencyStatus); + Debug.LogError($"Could not resolve all Firebase dependencies: {dependencyStatus}".SetColor(Color.red)); } }); #endif @@ -113,21 +114,9 @@ private void Init() #if VIRTUESKY_FIREBASE_REMOTECONFIG && VIRTUESKY_FIREBASE public Task FetchDataAsync() { - Debug.Log("Fetching data..."); + Debug.Log("Fetching data...".SetColor(CustomColor.Cyan)); Task fetchTask = FirebaseRemoteConfig.DefaultInstance .FetchAsync(TimeSpan.Zero); - if (fetchTask.IsCanceled) - { - Debug.Log("Fetch canceled."); - } - else if (fetchTask.IsFaulted) - { - Debug.Log("Fetch encountered an error."); - } - else if (fetchTask.IsCompleted) - { - Debug.Log("Fetch completed successfully!"); - } return fetchTask.ContinueWithOnMainThread(tast => { @@ -138,7 +127,7 @@ public Task FetchDataAsync() task => { Debug.Log(String.Format( - "Remote data loaded and ready (last fetch time {0}).", + "Remote data loaded and ready (last fetch time {0}).".SetColor(CustomColor.Cyan), info.FetchTime)); foreach (var remoteConfigData in listRemoteConfigData) { @@ -150,11 +139,11 @@ public Task FetchDataAsync() isFetchRemoteConfigCompleted = true; }); - Debug.Log("Firebase Remote Config Fetching completed!"); + Debug.Log("Firebase Remote Config Fetching completed!".SetColor(Color.green)); } else { - Debug.Log("Fetching data did not completed!"); + Debug.Log("Fetching data did not completed!".SetColor(Color.red)); } }); } diff --git a/Module/RemoteConfig/Runtime/Wolf.UnityCommon.RemoteConfigs.asmdef b/Module/RemoteConfig/Runtime/Wolf.UnityCommon.RemoteConfigs.asmdef index fd79215..914b136 100644 --- a/Module/RemoteConfig/Runtime/Wolf.UnityCommon.RemoteConfigs.asmdef +++ b/Module/RemoteConfig/Runtime/Wolf.UnityCommon.RemoteConfigs.asmdef @@ -5,7 +5,9 @@ "GUID:324caed91501a9c47a04ebfd87b68794", "GUID:ba00a69c89ab3a94d84d27e0051afcfd", "GUID:32dbaa332e571bf429b7de517f75f074", - "GUID:b59f3d97c7580944baac8dafbd217904" + "GUID:b59f3d97c7580944baac8dafbd217904", + "GUID:fca7ec166e04dc948b624a983315e2c9", + "GUID:d25c81a6e03d11c4fb58d263c8aaea84" ], "includePlatforms": [], "excludePlatforms": [],