Skip to content

Class: UnityAdapter ​

AppLovin / Vungle / IronSource / Mintegral / Moloco / etc. Detected by probing window.mraid.

Extends ​

Constructors ​

Constructor ​

ts
new UnityAdapter(): UnityAdapter;

Returns ​

UnityAdapter

Inherited from ​

MraidAdapter.constructor

Properties ​

PropertyModifierTypeDefault valueOverrides
namereadonlystring'unity'MraidAdapter.name

Methods ​

Close() ​

ts
Close(): void;

Returns ​

void

Inherited from ​

MraidAdapter.Close


EmitGameComplete() ​

ts
EmitGameComplete(): void;

Returns ​

void

Inherited from ​

MraidAdapter.EmitGameComplete


EmitGameStart() ​

ts
EmitGameStart(): void;

Counterpart emitters for game code — adapters that route to a network SDK override these to add the SDK-specific call alongside the local listener fan-out.

Returns ​

void

Inherited from ​

MraidAdapter.EmitGameStart


Finished() ​

ts
Finished(): void;

Returns ​

void

Inherited from ​

MraidAdapter.Finished


GameplayStart() ​

ts
GameplayStart(): void;

Returns ​

void

Inherited from ​

MraidAdapter.GameplayStart


GameplayStop() ​

ts
GameplayStop(): void;

Returns ​

void

Inherited from ​

MraidAdapter.GameplayStop


HappyTime() ​

ts
HappyTime(): void;

A highlight (a level beaten, a record): portals may celebrate it.

Returns ​

void

Inherited from ​

MraidAdapter.HappyTime


Init() ​

ts
Init(): Promise<void>;

Returns ​

Promise<void>

Inherited from ​

MraidAdapter.Init


IsSupported() ​

ts
IsSupported(): boolean;

Returns ​

boolean

Overrides ​

MraidAdapter.IsSupported


OnCtaClick() ​

ts
OnCtaClick(cb): AdUnsubscribe;

Parameters ​

ParameterType
cb() => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnCtaClick


OnCtaConfirmed() ​

ts
OnCtaConfirmed(cb): AdUnsubscribe;

Parameters ​

ParameterType
cb() => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnCtaConfirmed


OnGameComplete() ​

ts
OnGameComplete(cb): AdUnsubscribe;

Parameters ​

ParameterType
cb() => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnGameComplete


OnGameStart() ​

ts
OnGameStart(cb): AdUnsubscribe;

Canonical playable-ad lifecycle events. Game code emits gameStart / gameComplete through the adapter; the adapter routes them to whichever analytics path the network SDK expects. CTA events fire from inside OpenStore() so analytics see them even if the SDK redirect is asynchronous.

Parameters ​

ParameterType
cb() => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnGameStart


OnPause() ​

ts
OnPause(cb): AdUnsubscribe;

Parameters ​

ParameterType
cb() => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnPause


OnReady() ​

ts
OnReady(cb): AdUnsubscribe;

OnReady replays if Init has already fired ready. Other On* may never fire on some networks.

Parameters ​

ParameterType
cb() => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnReady


OnResume() ​

ts
OnResume(cb): AdUnsubscribe;

Parameters ​

ParameterType
cb() => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnResume


OnViewableChange() ​

ts
OnViewableChange(cb): AdUnsubscribe;

Parameters ​

ParameterType
cb(v) => void

Returns ​

AdUnsubscribe

Inherited from ​

MraidAdapter.OnViewableChange


OpenStore() ​

ts
OpenStore(url?): void;

Some networks (Facebook) configure the destination externally and ignore the url.

Parameters ​

ParameterType
url?string

Returns ​

void

Inherited from ​

MraidAdapter.OpenStore


Ready() ​

ts
Ready(): void;

Returns ​

void

Inherited from ​

MraidAdapter.Ready


SetStoreUrls() ​

ts
SetStoreUrls(urls): void;

Parameters ​

ParameterType
urlsStoreUrls

Returns ​

void

Inherited from ​

MraidAdapter.SetStoreUrls


ShowInterstitial() ​

ts
ShowInterstitial(): Promise<void>;

Portal ads: none outside a portal adapter.

Returns ​

Promise<void>

Inherited from ​

MraidAdapter.ShowInterstitial


ShowRewarded() ​

ts
ShowRewarded(): Promise<boolean>;

Resolves true when the player watched it to the end (grant the reward), false otherwise.

Returns ​

Promise<boolean>

Inherited from ​

MraidAdapter.ShowRewarded


Shutdown() ​

ts
Shutdown(): void;

Returns ​

void

Inherited from ​

MraidAdapter.Shutdown

© 2026 PlayAdGentic