Since I updated to Unity 2018.3.2f1, I only had problems.
When I used the following code I initialize the Ads with the correct game id the app did fine in Editor but once built and on the Android it crashed in 5s after start. However when I used an other Game ID from an other BLANK project with Ads, it did not crash and also worked, but it wasn’t my Game ID.
Here’s the very simple code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class Advertiser : MonoBehaviour {
public string unskippableVideo = "rewardedVideo";
public string skippableVideo = "popupAd";
public ShowOptions options;
public static Advertiser i = null;
private void Awake() {
i = this;
}
private void Start() {
Advertisement.Initialize("MYACTUALGAMEID", false);
}
public void LaunchAd(){
Advertisement.Show (unskippableVideo, options);
}
public void LaunchPopupAd() {
Advertisement.Show(skippableVideo, options);
}
}
I use the Unity Monetization 3.0 : https://assetstore.unity.com/packages/add-ons/services/unity-monetization-3-0-66123
an anyone help me solving this issue? Do I have to use another ID instead of the current one?
PS : (I found it here)
- operateDashboard/organizations/projects/myApp/Monetization/Platform/Settings