I have a game that I want to implement Unity banner ads to. I have implemented Unity rewarded and interstitial ads but there is no documentation or videos about banner ads. I had Admob Ads but Google blocked my account for 30 days so I need to transfer to Unity in this month.
Asked
Active
Viewed 342 times
1 Answers
1
there is my implementation:
Create method like this:
func prepareUnityBannerAdd() {
if UnityAds.isReady() {
UnityAdsBanner.initialize()
UnityAdsBanner.setDelegate(self)
UnityAdsBanner.setBannerPosition(UnityAdsBannerPosition.topCenter)
UnityAdsBanner.load(UNITY.banner) // This is my placment id string
}
}
in UnityAdsDelegate
method AdsReady
call like this:
func unityAdsReady(_ placementId: String) {
prepareUnityBannerAdd()
}
and finally in UnityAdsBannerDelegate
method BannerDidLoad
do something like this:
func unityAdsBannerDidLoad(_ placementId: String, view: UIView) {
bannerView.addSubview(view) // bannerView is just UIView to hold banner...
}
I hope this will help you

miff
- 185
- 4
- 15
-
UnityAdsBanner.load is depreciated – dub Jan 24 '21 at 23:56
-
Probably, this was year and half ago. That was for v3.2, latest is 3.6...I think – miff Jan 25 '21 at 17:53