diff --git a/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs b/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs
index 49b4b21..1892338 100644
--- a/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs
+++ b/Runtime/GuruCore/Runtime/Ads/ADServiceBase.cs
@@ -268,6 +268,15 @@ namespace Guru
MaxSdk.HideBanner(GetBannerID());
}
+ ///
+ /// 设置 Banner 背景颜色
+ ///
+ ///
+ public virtual void SetBannerBackgroundColor(Color color)
+ {
+ _backColor = color;
+ }
+
private void OnBannerLoadedEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
{
// Analytics.ADBadsLoaded(adUnitId, GetAdsLoadDuration(ref _badsloadStartTime), _badsCategory);
diff --git a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Auth.cs b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Auth.cs
index 6739c0e..1700194 100644
--- a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Auth.cs
+++ b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.Auth.cs
@@ -15,15 +15,17 @@ namespace Guru
//FirebaseAuth获取用户验证并同步用户数据
if (CurrentUser != null)
{
- Log.I(LOG_TAG, "[Auth]之前验证没过期,CurrentUser: " + CurrentUser.UserId);
+ Log.I(LOG_TAG, $"[Auth] user exists,UserId:{CurrentUser.UserId}");
+ OnFirebaseAuthResult?.Invoke(true);
return;
}
string authToken = IPMConfig.IPM_FIREBASE_TOKEN;
- Log.I(LOG_TAG, $"[Auth]AuthToken:{authToken}");
+ Log.I(LOG_TAG, $"[Auth] Firebase Token:{authToken}");
if (string.IsNullOrEmpty(authToken) || !NetworkUtil.IsNetAvaliable)
{
CoroutineHelper.Instance.StartDelayed(_wait, AuthUser);
+ OnFirebaseAuthResult?.Invoke(false);
return;
}
@@ -34,10 +36,12 @@ namespace Guru
{
Log.E(LOG_TAG,"[Auth] SignInWithCustomTokenAsync encountered an error: " + task.Exception);
CoroutineHelper.Instance.StartDelayed(_wait, AuthUser);
+ OnFirebaseAuthResult?.Invoke(false);
}
else if (CurrentUser == null)
{
CoroutineHelper.Instance.StartDelayed(_wait, AuthUser);
+ OnFirebaseAuthResult?.Invoke(false);
}
});
}
diff --git a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs
index ab025b3..694b85d 100644
--- a/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs
+++ b/Runtime/GuruCore/Runtime/Firebase/FirebaseUtil.cs
@@ -16,6 +16,11 @@ namespace Guru
public static DependencyStatus DependencyStatus = DependencyStatus.UnavailableOther;
public static bool IsFirebaseInitialized => DependencyStatus == DependencyStatus.Available;
public static Action onInitComplete;
+
+ public static Action OnFirebaseAuthResult;
+ public static Action OnUserAuthResult;
+
+
public static void InitFirebase(Action callback, bool isDebug = false)
{
@@ -53,8 +58,12 @@ namespace Guru
.SetRetryTimes(-1)
.SetSuccessCallBack(() =>
{
+ OnUserAuthResult?.Invoke(true);
InitializeMessage();
AuthUser();
+ }).SetFailCallBack(() =>
+ {
+ OnUserAuthResult?.Invoke(false);
})
.Send();
}