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.

Question How to Initialize and show other Ads source like Admob in Unity ads mediation

Discussion in 'Unity Mediation' started by agbo, Jan 8, 2022.

  1. agbo

    agbo

    Joined:
    Dec 5, 2016
    Posts:
    3
    Please after linking an Ads source (i.e Adcolony, Admob) and the adapter installed to my project, in my unity ads mediation.

    How do I initialize and load the Ads from the source other than unity ads.

    Can I use the bellow format for the entire ads source or is it just specific to unity ads

    InitializationOptions initializationOptions = new InitializationOptions();
    initializationOptions.SetGameId(gameId);
    UnityServices.InitializeAsync(initializationOptions)

    Or what are the package names to call in other to call the installed source(Admob, Adcolony).
     
  2. MonishGupta

    MonishGupta

    Unity Technologies

    Joined:
    May 30, 2018
    Posts:
    9
    Hi agbo,

    So you wouldn't use InitializationOptions in order to load an ad from a specific ad network as that only allows you to specify a GameId. What you need to do is:
    - Create a waterfall on the Unity Dashboard with only the ad source you'd want to serve ads from
    - When creating an ad unit instance via
    MediationService.Instance.Create<ADTYPE>Ad("ADUNIT"); replace "ADUNIT" with the waterfall adunit id you just created.
    - Initialize the SDK and Load the above ad unit instance you just created. (UnityServices.InitializeAsync() should suffice if you're logged into the services window)
    - This should only display ads from the ad unit source you've specified in the waterfall.

    Let me know if this is what you were referring to and if you have any other questions!

    -Monish