AdManager awakeにInitializeRewardedAds追加
This commit is contained in:
parent
2b0312ffe3
commit
a4ffb1ac49
|
|
@ -21,6 +21,11 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
||||||
|
|
||||||
|
|
||||||
void Awake(){
|
void Awake(){
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
InitializeRewardedAds();
|
||||||
|
|
||||||
#if DEVELOPMENT_BUILD
|
#if DEVELOPMENT_BUILD
|
||||||
IronSource.Agent.validateIntegration ();
|
IronSource.Agent.validateIntegration ();
|
||||||
IronSource.Agent.setAdaptersDebug(true);
|
IronSource.Agent.setAdaptersDebug(true);
|
||||||
|
|
@ -29,6 +34,9 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start(){
|
void Start(){
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
LoadBannerAds();
|
LoadBannerAds();
|
||||||
ShowBannerAd();
|
ShowBannerAd();
|
||||||
}
|
}
|
||||||
|
|
@ -92,10 +100,11 @@ public sealed class AdManager : SingletonMonoBehaviour<AdManager> {
|
||||||
_rewardAdClose = true;
|
_rewardAdClose = true;
|
||||||
}
|
}
|
||||||
public bool IsLoadedRewardVideo(){
|
public bool IsLoadedRewardVideo(){
|
||||||
#if DEVELOPMENT_BUILD || UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
return !UsayaStorageManager.LoadOrDefault(UsayaStorageFilename.Settings_Data, "DebugAlwaysVideoFailToLoad", false);
|
return !UsayaStorageManager.LoadOrDefault(UsayaStorageFilename.Settings_Data, "DebugAlwaysVideoFailToLoad", false);
|
||||||
#endif
|
#else
|
||||||
return IronSource.Agent.isRewardedVideoAvailable();
|
return IronSource.Agent.isRewardedVideoAvailable();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
public void ShowRewardVideo(Action<bool> callback){
|
public void ShowRewardVideo(Action<bool> callback){
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue