public void Initialize() { MobileAds.BuildManager() .WithManagerIdAtIndex(managerId.index) .WithInitListener(OnInitializeResult) .Initialize(); }
public void Start() { // -- Privacy Laws (Optional): MobileAds.settings.userConsent = userConsent; MobileAds.settings.userCCPAStatus = userCCPAStatus; // -- Configuring CAS SDK (Optional): MobileAds.settings.isExecuteEventsOnUnityThread = true; // -- Create manager: manager = MobileAds.BuildManager().Initialize(); // -- Configuring Banner Ad // Init Banner Size can be selected in Assets/CleverAdsSolutions/Settings //manager.bannerSize = AdSize.AdaptiveBanner; manager.bannerPosition = AdPosition.BottomCenter; // -- Subscribe to CAS events: manager.OnRewardedAdCompleted += RewardedSuccessful; // Any other callbacks from IMediationManager // -- Get native CAS SDK version versionText.text = MobileAds.GetSDKVersion(); InvokeRepeating("OnRefreshStatus", 1.0f, 1.0f); }