void OnGUI()
{
// Puts some basic buttons onto the screen.
GUI.skin.button.fontSize = (int)(0.05f * Screen.height);
Rect requestBannerRect = new Rect(0.1f * Screen.width, 0.05f * Screen.height,
0.8f * Screen.width, 0.1f * Screen.height);
if (GUI.Button(requestBannerRect, "Initialize"))
{
Debug.Log("AdManager initialization");
AdManager.initialize();
AdManager.setInterstitialCallbacks(this);
AdManager.setVideoCallbacks(this);
}
Rect showInterstitialRect = new Rect(0.1f * Screen.width, 0.175f * Screen.height,
0.8f * Screen.width, 0.1f * Screen.height);
if (GUI.Button(showInterstitialRect, "Show Interstitial"))
{
AdManager.showInterstitial();
}
Rect showVideoRect = new Rect(0.1f * Screen.width, 0.3f * Screen.height,
0.8f * Screen.width, 0.1f * Screen.height);
if (GUI.Button(showVideoRect, "Show Video"))
{
AdManager.showRewardedVideo();
}
}