Enabling the Ads Service - StansAssets/com.stansassets.ultimate-mobile GitHub Wiki
Initialize the SDK early in the game’s run-time life cycle, preferably at launch, using the Initialize function. For example, if you want to use Google Admob platform, that is how you init the ads client.
using SA.CrossPlatform.Advertisement;
...
UM_iAdsClient client = UM_AdvertisementService.GetClient(UM_AdPlatform.Google);
client.Initialize((result) => {
if (result.IsSucceeded) {
Debug.Log("Advertesment platfrom is ready to be used.");
} else {
Debug.Log("Failed to init " + result.Error.FullMessage);
}
});
```csharp
As you may notice, we haven't provided any setting. Settings required for the client to function properly can be provided via [Plugin UI](https://unionassets.com/ultimate-mobile-pro/plugin-editor-ui-736) using the [3rd-Party Tab](https://unionassets.com/ultimate-mobile-pro/services-ui-762). Or via Code. How to provide settings via code will be described for every platform explicitly. For example, check the [Google Admob configuration sample](https://unionassets.com/ultimate-mobile-pro/google-admob-784#settings).