Review the build and MRAID requirements for playable creatives with Unity Ads.
Read time 12 minutesLast updated 8 days ago
A playable is a short interactive experience that gives players an impression of what your game or app is about. Playables run inside the Unity Ads webview, either as a standalone playable ad or as a playable end card after a video ad. For recommendations on how to design playables that engage players, refer to Playable best practices.
For the details of each requirement, refer to the linked section. Every playable creative must meet the following requirements to pass moderation:
Only the Apple App Store logo, following Apple's marketing guidelines
Build requirements
Build requirements describe how you package and code the playable file itself, including its file format, layout, audio, and network behavior. Your playable file must meet the build requirements in the following tabs:
File requirements
The device downloads only the HTML file from the content delivery network (CDN), and Unity Ads ignores anything outside that file. Your playable file must meet the following requirements:
Requirement
Specification
File format
A single HTML file (
index.html
)
File size
Less than 5 MB
Asset encoding
Every image, audio, and video asset inlined as base64 data
Asset references
No references to other files, folders, or assets through relative paths or remote URLs
Note
A playable that works locally but shows a blank screen in the ad unit usually still references an asset by path or URL.
Minification
Whitespace removed and names shortened
Minimum operating system version
Android 5 or later
iOS 13 or later
Layout requirements
Unity Ads serves your playable in both portrait and landscape orientations, and you can't select the orientation manually.
Additionally, Unity displays its own controls in the top and bottom areas of the screen. These controls include the countdown, the close button, and UI for privacy and consent. The controls that appear depend on the type of ad, the region, and the player's consent state. These controls can also change over time.
Your playable must meet the following layout requirements:
Requirement
Specification
Orientation
Portrait and landscape, from a single responsive build
Note
Support for single-orientation playables is marked for deprecation, and all new playable creatives must be responsive. Single-orientation playables in existing creative packs or campaigns continue to work as expected.
Resizing
Adjusts when the screen size or orientation changes
Reserved screen areas
Text, buttons, and other interactive content stay out of the top and bottom areas of the screen, where Unity draws its own ad unit controls
Container UI
Doesn't block the close button or any other container UI element
Prohibited UI
No custom close buttons, fake close buttons, fake system UI, or deceptive alerts
Reserved areas and safe zone in a playable
Audio and video requirements
Your playable's audio and video must meet the following requirements:
Requirement
Specification
iOS mute switch
The ad is silent when the iOS mute switch is on.
To meet this requirement, use the Web Audio API as the primary audio path, and use
HTMLAudioElement
only as a fallback.
HTMLAudioElement
ignores the iOS mute switch.
Audio when not viewable
Audio stops when the ad isn't viewable, such as when the app moves to the background or the screen locks.
To meet this requirement, mute and resume audio from your
viewableChange
handler.
Video controls
Native video controls are hidden.
To meet this requirement, add the following CSS to your playable:
Your playable must meet the following network and attribution requirements:
Requirement
Specification
Network requests
The playable runs without network requests (XHR). It can't load images, configuration, or other content from a server at runtime.
Analytics calls
Unity can permit analytics calls that collect player interaction data. The calls can't contain personal data, such as user or device identifiers, and must follow all applicable laws and platform policies.
Attribution
The playable doesn't fire its own attribution events. Unity handles start, view, and click attribution server-side.
MRAID requirements
Playables must support Mobile Rich Media Ad Interface Definitions (MRAID) 3.0, the common API for rich media ads that run in mobile apps. The Unity Ads webview injects MRAID, so your playable doesn't need an MRAID script tag. For the full specification, refer to Mobile Rich Media Ad Interface Definitions (MRAID) (Interactive Advertising Bureau).
Your playable must meet the MRAID requirements in the following tabs:
MRAID feature support
Unity Ads supports only MRAID 3.0 full-screen ads.
Ensure that your playable doesn't use any of the following unsupported MRAID features:
expand
resize
Custom close buttons
sms
tel
calendar
storePicture
Custom close buttons aren't supported because the Unity Ads SDK controls when players can close or skip an ad.
Viewability requirements
Your playable must meet the following viewability requirements:
Requirement
Specification
Start
Only after the MRAID
ready
event, and only when the ad is viewable
Pause
When the ad isn't viewable
Don't start playable content on page load. Content that runs before the ad is viewable uses up the player's first seconds and looks broken.
The following example waits for MRAID to be ready, starts the playable when the ad is viewable, and pauses it when the ad isn't viewable:
// Wait for MRAID to be ready before you set up the playable.if (mraid.getState() === "loading") { mraid.addEventListener("ready", onReady);} else { onReady();}function onReady() { // Listen for viewability changes to pause and resume the playable. mraid.addEventListener("viewableChange", onViewableChange); // Start the playable only if the ad is already viewable. if (mraid.isViewable()) { startPlayable(); }}function onViewableChange(viewable) { if (viewable) { // Start the playable, or resume it if it already started. startPlayable(); } else { // Pause gameplay and mute audio. pausePlayable(); }}
App store redirect requirements
Your playable must meet the following app store redirect requirements:
Requirement
Specification
Method
mraid.open
Trigger
A player tap on a call to action (CTA), after the player interacts with gameplay
Redirects without player interaction aren't allowed, and the player's first tap can't open the app store. Deceptive redirects aren't allowed either. A deceptive redirect is a gameplay element that opens the app store instead of doing what the player expects.
To open the correct store, detect the platform from the user agent. Newer iPadOS versions report Macintosh in the user agent, so test for Android and treat all other platforms as iOS. The following example opens the store page for the player's platform:
// Call this function only from a player tap on your CTA, after the player interacts with gameplay.function openStore() { var ua = navigator.userAgent || navigator.vendor; var url = "https://apps.apple.com/app/idyourgame"; if (/android/i.test(ua)) { url = "https://play.google.com/store/apps/details?id=yourgame"; } mraid.open(url);}
Additional requirements
Playable end cards, gambling creatives, and playables for iOS apps must meet the following additional requirements:
Playable end card requirements
A playable end card is a playable that runs after a video ad. Playable end cards must meet all the build and MRAID requirements for playables.
Additionally, playable end cards must include a call to action (CTA) button that opens the Google Play store or Apple App Store.
Note
A playable end card can start at the same time as the video in the creative pack.
Gambling creative requirements
Because gambling ads are sensitive for many publishers, Unity requires gambling advertisers to have managed accounts.
Important
Moderation rejects gambling creatives from unmanaged partners.
To become a managed partner or learn more about Unity's gambling ad policies, contact Unity. For more information, refer to Unity's legal website.
iOS app requirements
Playables for iOS apps must follow Apple's requirements for creatives.
Note
The Apple App Store has unique rules for creatives. To adhere to Apple requirements, only depict the Apple App Store logo in creatives for iOS apps. Refer to Apple's marketing guidelines for more information.