Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Close or Skip

Discussion in 'Unity Ads & User Acquisition' started by gaishinbu, Aug 26, 2021.

  1. gaishinbu

    gaishinbu

    Joined:
    Oct 10, 2015
    Posts:
    64
    Hello.

    I wanna use "SceneManager.LoadScene(nextLevel);" when interstitial ad closed or skipped by player.

    I tried

    Code (CSharp):
    1. public void OnUnityAdsShowComplete(string adUnitId, UnityAdsShowCompletionState showCompletionState)
    2.     {     SceneManager.LoadScene(nextLevel);
    3.     }
    but not work. Anybody help?
     
  2. LIU_Hanyang96

    LIU_Hanyang96

    Unity Technologies

    Joined:
    Jul 12, 2021
    Posts:
    113
    Hi,

    May I know whether you set your showing listener in this function "Advertisement.Show(placementId, this);"? Only the listener is set in the show function, and you can get the callback.
     
  3. SuperArcherG

    SuperArcherG

    Joined:
    Aug 21, 2021
    Posts:
    3
    I had the same issue. it appears the OnUnityAdsShowComplete only works on build.
    At least that was how it went for me.