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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Question Set test mode when using mediation package?

Discussion in 'Unity Mediation' started by Bas-Smit, Sep 15, 2022.

  1. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    259
    I am using the mediation package, and on this page I read the following:

    If you build this project to a device, you must enable test mode to prevent the Unity Ads SDK from serving live ads, which could lead to your account being flagged or suspended for fraud.


    In the advertisement package I could set the test mode as an argument for Advertisement.Initialize, but when using the mediation package I have not found a way to set test mode. Can someone tell me how to set it, or is the documentation outdated?
     
  2. Ortiz_Daniel

    Ortiz_Daniel

    Unity Technologies

    Joined:
    Oct 14, 2021
    Posts:
    30
    Hi @Bas-Smit,

    Thanks for reaching out.

    When using our Mediaiton you can enable test Ads for Unity through the dashboard.

    Please review the details here, and let us know if there are any other questions.

    Best,
    Daniel Ortiz
     
    maxkcy likes this.
  3. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    259
    @Ortiz_Daniel Thanks for clearing that up.

    It is rather inconvenient that it is no longer possible to set test mode through code though. We now have to add all devices of all employees to ensure no live ads are served when testing our app in general. Previously we could just set test mode for development builds.

    We are now going to disable ads altogether in development builds, which will require us to make a special build that can only be run on marked devices to test ads :'(
     
    Last edited: Sep 19, 2022
  4. Ortiz_Daniel

    Ortiz_Daniel

    Unity Technologies

    Joined:
    Oct 14, 2021
    Posts:
    30
    Hi @Bas-Smit,

    Thanks for the feedback.

    We are always looking for how best to help our customers and will review this integration for future releases.

    In the meantime I would suggest trying out the dashboard tool.

    It may take some additional effort at first, but adding all test devices here will allow for easier QA across all Ad Sources.

    These ID's are also saved across your account, meaning you won't need to re-add them for each of your apps.

    Hopefully this will save you the time of making special builds in the future.

    Best,
    Daniel Ortiz
     
  5. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    259
    @Ortiz_Daniel Thanks for considering the issue. What would be even better imo is if test mode was automatically enabled in development builds in addition to the editor
     
  6. newtquestgames

    newtquestgames

    Joined:
    Mar 9, 2015
    Posts:
    6
    Hi,

    I've turned on test mode in ad mediation settings, and I've also setup my iphone as a test device, but I'm still seeing real ads when building from xcode and running on-device.

    Is there a delay before turning on test mode kicks in? Or are ads cached on-device somehow and will continue to display after test mode is turned on?

    The first time I saw a real ad I enabled test mode but I kept seeing real ads. I added my phone as a test device to see if that helped, but I still see real ads.

    Thanks
     
    Last edited: Oct 28, 2022
  7. LaughingRobot

    LaughingRobot

    Joined:
    Mar 7, 2021
    Posts:
    1
    I'm getting the same problem as newtquestgames on an iPad (don't have an iPhone, so use iPad to test iOs) (i.e. I see live ads when i've asked for test ads)

    For Android I was getting the same thing but managed to fix it:

    If you use the old Monetization->Setup->Test Devices -> Add New Device it does not ask you to specify platform, but if you add/edit a test device on the testing page under monetization you get to choose Android/iOs
    ....setting that on my android test device seems to have worked (i now see test ads), unfortunately the same doesn't seem to work for iOs.

    Settings->Test mode (Using test ads for all devices) doesn't seem to work for me on either device


    UPDATE: spoke too soon about the android fix: it seems to be intermittent - sometimes it will display test ads, seems ok for half an hour or so, then goes back to live ads for a bit, and then test ads again without me changing anything - Are there server problems at unity???
     
    Last edited: Oct 28, 2022
  8. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    There is currently an issue with the test ads feature on Unity Ads and is currently being fixed, we will keep you posted (it is not you, it is us :))
     
    newtquestgames likes this.
  9. newtquestgames

    newtquestgames

    Joined:
    Mar 9, 2015
    Posts:
    6
    Hi, while waiting for this fix is it safe to play these ads during testing? Or could my Unity account be flagged for playing my own ads and banned?
     
  10. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hi @newtquestgames, I'd say the chances of being flagged as fraud while testing are very low. If you do face any issues though, feel free to reach out to me.

    Thanks!
     
unityunity