Now it ignores the dashboard as well as the id of the ad type and only shows a rewarded ad, I cannot for the life of me get it to recognize a skippable ad.
I made a new ad called “skipper” and I’m debugging out when I call showad that it is trying to show “skipper”. I made “skipper” the default ad in my dashboard and ensured it’s skippable after 0 seconds.
No matter what I do, it shows a 30 second non skippable ad, I even set the default “video” ad to skippable after 0 seconds and it has no effect.
If you are using Unity 5.6.1 or above (which has Unity Ads SDK 2.1.0 integrated) you don’t need to manually deal with connectivity issues yourself. Better handling of connection state has been one of parts which has been rewritten for Ads SDK 2.x.
I have, I’m debugging it out right after it initializes with Advertisement.gameId.
I’m using Unity 5.3.7 still for this project.
It was working flawlessly a few days ago. Then I tried to implement heyzap and chartboost, etc but then reverted those changes and am just using unity ads atm. The only real change between when it was working and now is that I’m manually starting initialization after verifying there’s an internet connection.
The other thing that is different now is it used to just show a generic Unity 3d ad during test mode and now it’s showing a full 30 second real ad while debugging out that test mode is set to true.
edit:: Disabled all ads except the one I want and it ignores it, still shows a 30 second non skippable video.
Still sounds like you are not initializing with the “correct” game id. In Unity editor, you should see a message like “UnityAdsEditor: Initialize(, False);” in console window, when entering playmode for game. Is that initializing using the right game id?
I’m re-installing Unity. Is it possible someone can inject their id behind the scenes somehow? I was trying a few different packages like https://github.com/Applifier/unity-ads-helper/wiki, chartboost, heyzapp, etc between when it was working and when it stopped working. I reverted in git afterwards and figured it was good.
The yellow shows correct ad handle and my game ID is 1454318
I had a previous game ID and accidently clicked the COPPA toggle and couldn’t uncheck it so I made a new project ID and swapped in the new ID in the editor. I feel like simply throwing the id in the text field may not have updated entirely over the previous id?
That second yellow field is debugged right after:
in the code and the debug statement is:
Also the services tab in Unity editor will no longer let me disable ads, if I click to disable it says “Can’t disable ads”.
Tested here with your game id and placement id, works. Get the following in console log from editor:
Instead of the “PostProcessScene hack”, I would recommend that you use Asset Store version of Ads SDK 2.1 from https://www.assetstore.unity3d.com/en/#!/content/66123. Then you also don’t need to handle internet connection yourself, and also don’t risk that engine integrated version of Ads SDK somehow is still initializing Ads.
Would test mode affect it any? Or could the skip button not be working somehow?
Should I archive the previous projects in services? This project has 3 entries there but I’m only using 1.
I re-imported the Unity Ads off the store, 2.1 version, it didn’t ask me to download so I must have been using the latest version (installed ads last week)
Made sure to disable Ads in the Services tab to get rid of the multiple ShowResult declaration.
I made an empty scene with 2 buttons and a test script:
using UnityEngine;
using System.Collections;
using UnityEngine.Advertisements;
public class TestAds : MonoBehaviour {
private string androidGameID = "1454318";
// Use this for initialization
void Start () {
}
public void Initialize() {
Advertisement.Initialize(androidGameID);
print("Initialized " + Advertisement.isInitialized);
}
public void ShowAd() {
StartCoroutine("WaitToShow");
}
IEnumerator WaitToShow()
{
print("Ready: " + Advertisement.IsReady("skipper"));
while (!Advertisement.IsReady("skipper"))
{
yield return null;
}
print("Ready: " + Advertisement.IsReady("skipper"));
print("state " + Advertisement.GetPlacementState("skipper"));
Advertisement.Show("skipper");
}
private void Update()
{
if (Advertisement.isInitialized) {
if (Advertisement.isShowing) {
print("state " + Advertisement.GetPlacementState("skipper"));
}
}
}
}
Button #1 is Initialize(), and calls Initialize.
Button #2 is ShowAd()
I deploy on device, click initialize, it debugs true for .isInitialized
I then click Show Ad, it shows a 30 second non skippable ad…