Test ads by calling your SDK’s ad methods from real gameplay triggers, watching the returned events (shown, closed, empty), and confirming the game keeps running when no ad is returned. Test in the actual build target (WebGL, itch.io iframe, etc.), not just the editor.
At a glance
| Fact | Value | Source |
|---|---|---|
| Ad request | each time game asks for ad | playgama.com |
| Fill rate | impressions / ad requests | playgama.com |
| Unity Web talks to JS via | .jslib plugin | docs.unity3d.com |
Test ads by wiring the SDK’s ad calls into real gameplay points (level end, pause, retry) and checking what comes back, rather than just confirming an ad appears once. Trigger each placement manually during a playtest, watch for the shown/closed events, and force an empty response case to confirm the game continues without freezing or blocking input.
What to check, in order
- Call the ad method from the same code path players will hit (not a debug key that skips normal state), so timing and game state around the ad are realistic.
- Handle the ’empty’ case explicitly: if no ad is returned, resume the game immediately – never leave the player stuck waiting or show an error to them.
- In Unity WebGL, ad calls typically go through a .jslib plugin bridging C# to browser JavaScript; in Godot 4, the same role is played by JavaScriptBridge. Test the actual exported build, since editor play mode won’t exercise this path.
- If the game runs inside an iframe (common on portals and on itch.io), test there directly – cross-origin restrictions can affect how the host page and game communicate.
- Re-test after any build or SDK version change, since ad call signatures and event names can change between versions.
See the Playgama Bridge SDK docs for the exact methods and events to call from your game code.
Sources
- Playgama Bridge SDK – getting started
- Playgama: Submitting a game
- Unity manual: interacting with browser scripting
- Godot docs: exporting for the Web
- web.dev: Core Web Vitals
Related questions
What should happen if an ad request comes back empty during testing?
The game should resume immediately without an error shown to the player. Design every ad call so gameplay continues normally whether or not an ad was returned.
Can I test ads in the Unity editor instead of a real build?
No – ad calls on web builds go through a .jslib plugin to browser JavaScript, so you need to test the actual exported WebGL build, not editor play mode.
Last updated: 24 September 2026