-
Notifications
You must be signed in to change notification settings - Fork 16
Advertisement
Enable Advertising module via menu Tools
> Pancake
> Wizard
-
Auto Init :
-
true
if you want Adverstising to automatically initialize setting atStart()
-
false
you need to callAdvertising.Initialize()
manually where you want -
Advertising.Initialize()
is required to use other Adverstising APIs
-
-
GDPR : General Data Protection Regulation
- Under the Google EU User Consent Policy, you must make certain disclosures to your users in the European Economic Area (EEA) and obtain their consent to use cookies or other local storage, where legally required, and to use personal data (such as AdID) to serve ads. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR)
-
true
the consent popup will be displayed automatically as soon asGoogleMobileAds Initialize
is successful if you use Admob for show ad, orMaxSdk.InitializeSdk()
initalize completed when you usemax
for show ad -
false
nothing happened - you can call manual consent form by
if (!GDPRHelper.CheckStatusGDPR()) { Advertising.ShowConsentFrom(); }
- Note:
- You can also call manually by calling through
Advertising.ShowConsentForm()
- On android it will show consent form popup,
- On ios it will show ATT popup
- You can also call manually by calling through
-
Multi Dex:
- enable multi dex to fix build gradle error
-
Current Network:
- the ad network currently used to display ads
-
Privacy & Policy : displayed to edit when GDPR enabled
- the link to the website containing your privacy policy information
- Auto Ad-Loading Mode
- All : auto load
interstitial ad
,rewarded ad
,rewarded interstitial ad
,app open ad
- All : auto load
- Ad Checking Interval
- ad availability check time. ex:
Ad Checking Interval = 8
checking load ad after each 8 second
- ad availability check time. ex:
- Ad Loading Interval
- time between 2 ad loads. ex:
Ad Loading Interval = 15
the next call to load the ad must be 15 seconds after the previous one
- time between 2 ad loads. ex:
- BannerAd:
- when size banner is SmartBanner you can choose option use Apdaptive Banner
-
Age Restrictd User
-
To ensure COPPA, GDPR, and Google Play policy compliance, you should indicate when a user is a child. If you know that the user is in an age-restricted category (i.e., under the age of 16), set the age-restricted user flag to true
-
If you know that the user is not in an age-restricted category (i.e., age 16 or older), set the age-restricted user flag to false
-
Advertising.ShowBannerAd()
Advertising.HideBannerAd()
Advertising.DestroyBannerAd()
Advertising.GetAdaptiveBannerHeight()
Advertising.LoadInsterstitialAd()
Advertising.IsInterstitialAdReady()
Advertising.ShowInterstitialAd()
Advertising.LoadRewardedAd()
Advertising.IsRewardedAdReady()
Advertising.ShowRewardedAd()
Advertising.LoadRewardedInterstitialAd()
Advertising.IsRewardedInterstitialAdReady()
Advertising.ShowRewardedInterstitialAd()
Advertising.LoadAppOpenAd()
Advertising.IsAppOpenAdReady()
Advertising.ShowAppOpenAd()
Advertising.ShowConsentFrom()
- you can attach your custom event callback by
Action<EInterstitialAdNetwork> InterstitialAdCompletedEvent; // call when user completed watch interstitialAd
Action<ERewardedAdNetwork> RewardedAdCompletedEvent; // call when user completed receive reward form rewardedAd
Action<ERewardedAdNetwork> RewardedAdSkippedEvent; // call when user skip watching rewardedAd
Action<ERewardedInterstitialAdNetwork> RewardedInterstitialAdCompletedEvent; // call when user completed receive reward form rewardedInterstitialAd
Action<ERewardedInterstitialAdNetwork> RewardedInterstitialAdSkippedEvent; // call when user skip watching rewardedInterstitialAd
Action<EAppOpenAdNetwork> AppOpenAdCompletedEvent; // call when user completed watch appOpenAd
- by default admob will be used to show ad, you can use the following syntax
Advertising.SetCurrentNetwork("name network");
ex: Advertising.SetCurrentNetwork("applovin");
or: Advertising.SetCurrentNetwork(EAdNetwork.AppLovin);
- "admob"
- "applovin"
- "ironsource"
If you need to define scripting symbols via scripts in the Editor so that your Editor scripts are affected by the change, you must use PlayerSettings.SetScriptingDefineSymbolsForGroup. However, there are some important details to note about how this operates.
Important: this method does not take immediate effect. Calling this method from script does not immediately apply and recompile your scripts. For your directives to take effect based on a change in scripting symbols, you must allow control to be returned to the Editor, where it then asynchronously reloads the scripts and recompiles them based on your new symbols and the directives which act on them.
So, for example, if you use this method in an Editor script, then immediately call BuildPipeline.BuildPlayer on the following line in the same script, at that point Unity is still running your Editor scripts with the old set of scripting symbols, because they have not yet been recompiled with the new symbols. This means if you have Editor scripts which run as part of your BuildPlayer execution, they run with the old scripting symbols and your player might not build as you expected.
-
IronSource SDK
-
In case you have successfully imported ironSOurce but Unity Editor still says plugin not found
IronSource plugin not found. Please import it to show ads from IronSource
Open ProjectSetting and navigate to Scripting Definition Symbol then remove the line PANCAKE_IRONSOURCE_ENABLE -> wait editor complie and add symbol again
-
-
AppLovin SDK (fixed in version 8.4.1.1)
- Mediation adapter Chartboost 8.4.1 is crashing and not building on Unity after they updated to Java 11
- so you need use old version of Chartboot (8.2.1.0)
<?xml version="1.0" encoding="utf-8"?>
<dependencies>
<androidPackages>
<androidPackage spec="com.applovin.mediation:chartboost-adapter:8.2.1.0"/>
<androidPackage spec="com.google.android.gms:play-services-base:16.1.0"/>
</androidPackages>
<iosPods>
<iosPod name="AppLovinMediationChartboostAdapter" version="8.4.2.0"/>
</iosPods>
</dependencies>