AdManager awakeにInitializeRewardedAds追加

This commit is contained in:
kimura 2021-11-15 12:13:14 +09:00
parent 2b0312ffe3
commit a4ffb1ac49
1 changed files with 11 additions and 2 deletions

View File

@ -21,6 +21,11 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
void Awake(){
#if UNITY_EDITOR
return;
#endif
InitializeRewardedAds();
#if DEVELOPMENT_BUILD
IronSource.Agent.validateIntegration ();
IronSource.Agent.setAdaptersDebug(true);
@ -29,6 +34,9 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
}
void Start(){
#if UNITY_EDITOR
return;
#endif
LoadBannerAds();
ShowBannerAd();
}
@ -92,10 +100,11 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
_rewardAdClose = true;
}
public bool IsLoadedRewardVideo(){
#if DEVELOPMENT_BUILD || UNITY_EDITOR
#if UNITY_EDITOR
return !UsayaStorageManager.LoadOrDefault(UsayaStorageFilename.Settings_Data, "DebugAlwaysVideoFailToLoad", false);
#endif
#else
return IronSource.Agent.isRewardedVideoAvailable();
#endif
}
public void ShowRewardVideo(Action<bool> callback){
#if UNITY_EDITOR