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 "1234567" which doesn't exist it did not crash and also worked.
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); //works 1234567
}
public void LaunchAd(){
Advertisement.Show (unskippableVideo, options);
}
public void LaunchPopupAd() {
Advertisement.Show(skippableVideo, options);
}
}
I use the Unity Monetization 3.0 : [Unity Asset Store Link][1]
So can 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
[1]: https://assetstore.unity.com/packages/add-ons/services/unity-monetization-3-0-66123
↧