Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug showRewardedVideo can't be called before the Rewarded Video ad unit initialization completed success

Discussion in 'LevelPlay' started by Adam_Poncle, Oct 5, 2023.

  1. Adam_Poncle

    Adam_Poncle

    Joined:
    Apr 4, 2022
    Posts:
    7
    Any help with the following error would be greatly appreciated. The verification seems to come back saying everything I have setup and the I have chosen are fine, but ads will not show when calling showRewardedVideo.

    The error I get is:
    showRewardedVideo can't be called before the Rewarded Video ad unit initialization completed successfully


    I do get a callback stating LevelPlay/IronSource has been initialized
     
  2. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
    Hi @Adam_Poncle
    Can I see your code snippet of SDK initialization + show Video logic?
     
  3. Adam_Poncle

    Adam_Poncle

    Joined:
    Apr 4, 2022
    Posts:
    7
    Hi,

    Init code below:
    Code (CSharp):
    1. private void InitLevelPlay()
    2. {
    3. #if UNITY_ANDROID || UNITY_IOS
    4.     var developerSettings = Resources.Load<IronSourceMediationSettings>(IronSourceConstants.IRONSOURCE_MEDIATION_SETTING_NAME);
    5.     if (developerSettings != null)
    6.     {
    7. #if UNITY_ANDROID
    8.         var appKey = developerSettings.AndroidAppKey;
    9. #elif UNITY_IOS
    10.         var appKey = developerSettings.IOSAppKey;
    11. #endif
    12.  
    13.         IronSource.Agent.init(appKey, IronSourceAdUnits.REWARDED_VIDEO);
    14.     }
    15. #endif
    16. }
    Show code below:
    Code (CSharp):
    1. private void ShowRewardedAdAsync()
    2. {
    3.     if (IronSource.Agent.isRewardedVideoAvailable())
    4.     {
    5.         IronSource.Agent.showRewardedVideo();
    6.         Debug.Log("[UnityServicesManager] " + "Rewarded Ad Shown!");
    7.     }
    8.     else
    9.     {
    10.         Debug.LogWarning("[UnityServicesManager] RewardedAd not available");
    11.     }
    12. }
     
  4. Adam_Poncle

    Adam_Poncle

    Joined:
    Apr 4, 2022
    Posts:
    7
    I've also raised a support ticket via LevelPlay but had no response.
     
  5. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
    Hey @Adam_Poncle
    Can you DM me your support ticket number so I can better track it?
     
  6. LeeTgk

    LeeTgk

    Joined:
    Jul 28, 2023
    Posts:
    1
    Hey i'm having the same error. @Adam_Poncle, did you got any updates from your LevelPlay ticket ?
     
  7. cnguyen_unitylevelplay

    cnguyen_unitylevelplay

    Unity Technologies

    Joined:
    Mar 23, 2023
    Posts:
    69
    I responded to that support ticket and resolved the issue. If you created a ticket, please DM me your ticket number so I can have a look.