Test mode Unity

It is possible to enable loading of test ads on a specific device.

To add a test device:
1. Enable Debug Mode and download ads on the device.

2. View a message in the console containing the Instance Id of the device:

D/[myTarget]: Device instanceId is aa5e068d-fdba-46f6-b84a-d1369e76de13. Use this value in adInstance.withTestDevices() to enable test mode on this device.iOS:[myTarget debug] Current device's Instance Id is D346D6CE-3414-4C22-BFC8-B4DD4983B1C8, use this value in method withTestDevices() in order to enable Test Mode.

Copy the Instance Id of the test device to the clipboard.

3. Add a call to the WithTestDevices(params String[] deviceInstanceIds) method to your code and pass the Instance Id of the test device (or several devices) to it:

ad.WithTestDevices("aa5e068d-fdba-46f6-b84a-d1369e76de13", "D346D6CE-3414-4C22-BFC8-B4DD4983B1C8");
4. Restart the application, now the added devices will receive test ads.

5. Make sure that this mode is disabled in the release version of the application.
Was this article helpful?