Displaying a simple ad
Advertisements are a possible way to generate revenue from players playing your game. As mentioned previously, Unity Ads has two different types of ads that we can display: simple and rewarded. Simple ads are easy to use, hence the name, and allow users to have simple full-screen interstitial ads. This can be really useful when moving between levels or perhaps when the player wants to restart the game. Let’s see how we can implement that feature now. Implement the following steps:
- To get started, we will need to add a new function to the
UnityAdController
class:/// <summary> /// Will get the appropriate Ad ID for the platform we /// are on /// </summary> /// <returns>A usable Ad ID</returns> private static string GetAdID() { string adID = "Interstitial_"; if (Application.platform == RuntimePlatform.IPhonePlayer...