void Start() { admob = GetComponent <GoogleAdMobHandler>(); unityads = GetComponent <UnityAdsHandler>(); applovins = GetComponent <ApplovinHandler>(); AdsRewardButton.onClick.AddListener(() => { unityads.ShowRewarded(); }); AdsInsertButton.onClick.AddListener(() => { unityads.ShowInsert(); }); ApplovinRewardButton.onClick.AddListener(() => { applovins.ShowRewarded(); }); ApplovinInsertButton.onClick.AddListener(() => { applovins.ShowInsert(); }); AdMobInsertButton.onClick.AddListener(() => { admob.ShowInsert(); }); AdMobRewardButton.onClick.AddListener(() => { admob.ShowRewarded(); }); }
public List <string> asdSortList = new List <string>();// 服务器返回的广告播放排序 void Start() { admob = GetComponent <GoogleAdMobHandler>(); unityads = GetComponent <UnityAdsHandler>(); applovins = GetComponent <ApplovinHandler>(); asdSortList.Add(adMobString); asdSortList.Add(unityadsString); asdSortList.Add(applovinString); }