-
Notifications
You must be signed in to change notification settings - Fork 1
Unity Plugin Setup
In order to receive any type of advertisement, you should initialize Appmediation Unity Plugin first. To initialize Appmediation Unity Plugin, call the method below:
AMSDK.InitializeSDK("YOUR_APP_KEY");
N.B.: Get your app key from here.
Calling initialization method as early as possible on your applications' session will help to receive ads faster.
Appmediation Unity Plugin currently supports banners, interstitials and rewarded videos for auto-loading.
- AMSDK.AdType.Banner
- AMSDK.AdType.Interstitial
- AMSDK.AdType.Rewarded
If you want Appmediation Unity Plugin to handle ad requests and loadings for you, you need to set ad types to auto load. You can do it by calling methods below:
AMSDK.AutoLoad(AMSDK.AdType.Interstitial);
AMSDK.AutoLoad(AMSDK.AdType.Rewarded);
...
You need to obtain end-users' consent from EU/EEA zone users before using our advertising services. We have developed two options you can use:
Appmediation SDK comes with this functionality enabled by default. With this functionality, we check the user's location and if the user is in the EU/EEA zone, we show them the consent message. If the end user is outside of the EU/EEA zone, we do not bother them with GDPR consent message at all!
If you want to disable this functionality and use the manual collection, please disable it by;
AMSDK.AutoGDPRConsent(false);
If you have your own GDPR message and collect consent from your own view, please pass the collected consent value to the method below and you are all set!
AMSDK.SetUserConsent(true);
TBA
If you want to test your integration with our test ads, set test mode by calling:
AMSDK.SetTestMode(true);
If you are using debugger to check logs, please set logging enabled by calling:
AMSDK.SetTestMode(true);
You can set a user identifier by calling:
AMSDK.SetUserIdentifier("user_id");
N.B: Currently this feature is only used by server to server rewarded video callbacks. You MUST set this value if you want to use server to server callbacks.