Unity ads showing properly but doesnt display error mesage when failed.

Hello everyone.!

Im having a little issue whit my game, my ad function is working good when i have internet conection but i want it to show an error mesage when there is an error like not internet conection, in the unity program it works well, but when i make a test on android device it just doesnt i leave my code below.

Here is the script that manage my adds.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
using UnityEngine.SceneManagement;

public class Adds : MonoBehaviour {

   
    public bool activar = true;
   

    public void Start()
    {
  
       
    }

    public void ShowAdd()
    {
        if(Advertisement.IsReady())
        {
        Advertisement.Show("rewardedVideo", new ShowOptions() { resultCallback = HandleResult});
        }

    }


    public void HandleResult(ShowResult result)
    {
        switch(result)
        {
            case ShowResult.Finished:
                if(GlobalObjectPro.Instance.vidas < 3)
                {
                    GlobalObjectPro.Instance.vidas++;
                    SceneManager.LoadScene("MapaPrincipal");

                }

                break;

            case ShowResult.Skipped:
               
                break;

            case ShowResult.Failed:
                activar = true;
                PauseMenu.Instance.activarCuadroConexion(activar);
                break;


        }

    }
}

And this is the code that should be activated when the resultFailed, is just to set active an image.

    public void activarCuadroConexion(bool activar)
    {
        cuadrConexion = activar;
    }

thanks every1 i hope some1 knows whats happening :smile:

You’re setting a bool…but…what are you doing with that bool? What do you expect to happen?

If you’re trying to turn on some dialog box, you’ll need to use SetActive on the gameobject. Setting a bool on it’s own will do nothing.

Oh yhea there is a method that setactive my image when that bool is true, but thats not the problem that works properly the thing is in the code above that i want it to be shown when there is an error on the add like no internet conection.

I can’t say that unity ads is going to check for internet. I believe it tries to play and if it can’t, it just throws an error. I’m not sure if it actually cares what the error is. You can see what is returned in result to see if there is an error code or error message.

Chances are you are going to have to handle a no internet check yourself.

I may be misunderstanding, right now if it gets an error it sets your bool to true and you’re saying some dialog box appears. Are you saying it doesn’t error out when you don’t have internet?