Search Unity

Discussion My unity ads works on unity editor but not in build (banner)

Discussion in 'Unity Ads & User Acquisition' started by DOGUKANN3, Dec 3, 2023.

  1. DOGUKANN3

    DOGUKANN3

    Joined:
    Jul 22, 2021
    Posts:
    7
    Hi everyone, my unityads working on unity editor and also my rewarded ads working on android build too, but my banner ads not working on build. I have an log cat error mybe helps to figure out Ekran görüntüsü 2023-12-02 222300.png
     
  2. Carl_UnityDSE

    Carl_UnityDSE

    Unity Technologies

    Joined:
    May 25, 2022
    Posts:
    59
    Hello @DOGUKANN3
    Based on the log entry, I can see that you are attempting to load the banner ad before the Unity Ads SDK has initialized.
    The Unity Ads SDK has a method: OnInitializationComplete. You can use it to set conditions and to determine if you can load your ads.
     
    DOGUKANN3 likes this.
  3. DOGUKANN3

    DOGUKANN3

    Joined:
    Jul 22, 2021
    Posts:
    7
    Thank you so much! that worked! and sorry for my late response. I was busy with my project. I have another thing that stuck in my mind. When i initialize my ads in first scene in my scene hierarchy (Which is loading scene) do i need to 'Don't destroy on load' my ads initializer for my ads to show up ? becasue when i initialize my ads inside a beggining scene i just saw default unity banner in my Level_1 scene which is not showing actual ads.