question

XForrest avatar image
XForrest asked

Stressing T_T Ads failing Unity

Hey I really need help - no matter what I do the ads will not load in Unity. They keep returning false. This is my code > " using UnityEngine; using System.Collections; using System.Collections; using com.amazon.mas.cpt.ads; public class MobileTestAds : MonoBehaviour { IAmazonMobileAds mobileAds = AmazonMobileAdsImpl.Instance; ApplicationKey key = new ApplicationKey(); ShouldEnable shouldEnable = new ShouldEnable(); void Start () { key.StringValue = "sample-app-v1_pub-2"; shouldEnable.BooleanValue = true; mobileAds.SetApplicationKey (key); mobileAds.EnableLogging (shouldEnable); mobileAds.EnableTesting (shouldEnable); //Optional mobileAds.EnableGeoLocation(shouldEnable); } void OnGUI () { //Create a new slot for interstitial if(GUI.Button(new Rect(20,40,80,20), "Create Ads")) { Ad interstialAd = mobileAds.CreateInterstitialAd(); string adType = interstialAd.AdType.ToString(); long identifier = interstialAd.Identifier; Debug.Log (identifier + " " + adType); } // Load interstitial if(GUI.Button(new Rect(20,80,80,20), "Load Ads")) { LoadingStarted response = mobileAds.LoadInterstitialAd(); bool loadingStarted = response.BooleanValue; Debug.Log (loadingStarted); } // Display interstitial if(GUI.Button(new Rect(20,120,80,20), "Show Ads")) { AdShown shownInterstitialAd = mobileAds.ShowInterstitialAd(); bool adShown = shownInterstitialAd.BooleanValue; Debug.Log("adShown: " + adShown); } } } " And it the console it shows: 0 FLOATING False adShown: False I have changed the sample manifest to AndroidManifest. Nothing works, I am stuck please help anyone T_T
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

XForrest avatar image
XForrest answered
Also in logcat when using it on my android phone, it says > NullReferenceException : Object reference not set to an instance of an object at MobileTestAds.OnGUI () [0x0008a] in C:\......\MobileTestAds.cs 25 Thanks anyone who can help
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AppyNation Ltd. avatar image
AppyNation Ltd. answered
I posted about the same problem here https://forums.developer.amazon.com/forums/thread.jspa?threadID=9415&tstart=0 No replies to that thread from Amazon people. Support is pretty poor tbh.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

XForrest avatar image
XForrest answered
Sad, really :/
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ross@Amazon avatar image
Ross@Amazon answered
Can you please provide a logcat so that the SDK team can investigate the issue?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andrew@Amazon avatar image
Andrew@Amazon answered
This appears to be an issue with the iOS version of the Unity Plugin. We are working on the issue and it should be addressed in the next Unity Plugin release.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andrew@Amazon avatar image
Andrew@Amazon answered
The new plugins for the Cross-Platform Engines have been released. You can find the information about the release here: https://forums.developer.amazon.com/forums/thread.jspa?threadID=10039&tstart=0 And you can download the new zip from the Mobile Ads page on the developer portal: https://developer.amazon.com/public/apis/earn/mobile-ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.