Search Unity

IUnityAdsListener not found

Discussion in 'Unity Ads & User Acquisition' started by TortoRacoon, Jul 18, 2019.

Thread Status:
Not open for further replies.
  1. TortoRacoon

    TortoRacoon

    Joined:
    Apr 17, 2019
    Posts:
    61
    I am trying to implement Rewarded videos to my game and I'm following the Integration Guide where it shows to use "IUnityAdsListener"
    upload_2019-7-18_16-56-40.png
    so I try writting it in my class but it appears as "Not found"


    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.UI;
    5. using UnityEngine.Advertisements;
    6.  
    7. public class AdManager : MonoBehaviour, IUnityAdsListener
    8. {
    What am I missing?
     
  2. TortoRacoon

    TortoRacoon

    Joined:
    Apr 17, 2019
    Posts:
    61
    upload_2019-7-18_17-6-54.png
    following the same guide I also get this redmark saying "There is no definition for 'Listener'"

    This is what I am getting in the console
    "Assets\Scrips\AdScriptsbyMe\AdManager.cs(7,41): error CS0246: The type or namespace name 'IUnityAdsListener' could not be found (are you missing a using directive or an assembly reference?)"

    Thanks in advance
     
    Last edited: Jul 18, 2019
  3. bruinsee

    bruinsee

    Joined:
    Nov 9, 2016
    Posts:
    2
    Hey,

    If you head over to the package manager, you will need to install the latest version of Unity Ads.

    This can be done by going to your Unity window and clicking
    Window > Package Manager

    After that click on the dropdown next to ads. You can either select the latest version, or see all versions and select one.
    Next click on the update button and you should now have no errors. Here's a little image of the package manager window
    upload_2019-7-19_14-51-39.png
     
  4. TortoRacoon

    TortoRacoon

    Joined:
    Apr 17, 2019
    Posts:
    61
    Thank you man!
     
    honor0102 and warpmanih like this.
Thread Status:
Not open for further replies.