Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question error after updating unity ads to 4.0.1 " error CS0246: The type or namespace name 'IUnityAdsListen"

Discussion in 'Unity Ads & User Acquisition' started by kapwa, Feb 11, 2023.

  1. kapwa

    kapwa

    Joined:
    Nov 22, 2016
    Posts:
    4
    After updating unity ads to 4.0.1 in the console, a fatal error "error CS0246: The type or namespace name 'IUnityAdsListener' could not be found (are you missing a using directive or an assembly reference?)". Google Play requires a unit ads version of at least 4.0.1, please help how to solve the problem. On version 3.4.1 everything works stably
     
  2. aylin_unity3d

    aylin_unity3d

    Unity Technologies

    Joined:
    Apr 6, 2015
    Posts:
    48
    Hi @kapwa
    The problem is that the "IUnityAdsListener" interface was deprecated in our SDK from version 3.7.5 and this interface was replaced by three new interfaces
    • IUnityAdsInitializationListener
    • IUnityAdsLoadListener
    • IUnityAdsShowListener

    Please, check the documentation here: https://docs.unity.com/ads/InitializingTheUnitySDK.html

    The min SDK version that complies with google's policy is 4.0.1. So we recommend you use the latest version.
     
  3. Berthil

    Berthil

    Joined:
    Aug 26, 2013
    Posts:
    22
    Hello @kapwa. Did you managed to solve it? I just updated my Unity from 2021 to 2022 and got this error.

    Thanks