Hello,
I've imported AdMob package for Unity and followed the instructions in this link.
Also I've created Google AdMob account and currently activated and registered my Android device as a test device. While testing on game play, I receive debug.log notification of successful ad loading. But after creating a build to test on android device, the ad is not showing.
Here is my code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Api;
using System;
public class Ads : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
////Initialize Google Mobile Ads
MobileAds.Initialize(initStatus =>
{
Debug.Log("Calling the ad...");
});
////TODO: Remember to remove this before releasing the app.
List deviceIds = new List();
//This is the my device ID for testing
deviceIds.Add("MYDEVICEID");
RequestConfiguration requestConfiguration = new RequestConfiguration.Builder().SetTestDeviceIds(deviceIds).build();
MobileAds.SetRequestConfiguration(requestConfiguration);
}
}
On the inspector, I've chosen the Auto Load Enabled. Am I missing something?
Unity version: 2019.4.21f1
AdMob package version: 5.4.0.90
Thanks
↧