-
Notifications
You must be signed in to change notification settings - Fork 2
Advertising
VirtueSky edited this page Dec 3, 2024
·
8 revisions
- Support for Max, Admob and IronSource
- Open
AdSetting
: Open tabAdvertising
inMagic Panel
- Here, select
Ad Network
and enter the ad unit id you want to use, don't forget addDefine Symbol
. - If you use
Runtime auto init
,Advertising
will be created automatically when you load the scene. Conversely, you would attachAdvertising
to the GameObject in the scene so that the ads can be loaded
- Demo API Show Ads
public void ShowBanner()
{
Advertising.BannerAd.Show();
}
public void HideBanner()
{
Advertising.BannerAd.HideBanner();
}
public void ShowInter()
{
Advertising.InterstitialAd.Show().OnCompleted(() =>
{
// handle show inter completed
});
}
public void ShowReward()
{
Advertising.RewardAd.Show().OnCompleted(() =>
{
// handle show reward completed
}).OnSkipped(() =>
{
// handle skip reward
});
}
public void ShowRewardInter()
{
Advertising.RewardedInterstitialAd.Show().OnCompleted(() => { });
}
public void ShowAppOpen()
{
Advertising.AppOpenAd.Show();
}
- Android: Advertising will only be initialized after user consent allows requesting ads.
- iOS: If ATT is authorized, GDPR compliance will be initialized, and advertising will only be initialized after user consent allows requesting ads.
If ATT is not authorized, GDPR compliance will not be initialized, and advertising will proceed without GDPR conditions. - When using GDPR, make sure you have created the GDPR message in Admob
- Advertising is successfully initialized only when the Android logcat shows
currentAdClient: ...