Type Function Return value Boolean Revision Release 2022.3683 Keywords ads, advertising, Unity Ads, isLoaded See also unityads.show() unityads.*
Returns a boolean indicating whether an ad is loaded and ready for display.
unityads.isLoaded( placementId )
local unityads = require( "plugin.unityads.v4" ) -- Unity Ads listener function local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.provider ) end end -- Initialize the Unity Ads plugin unityads.init( adListener, { appId="YOUR_UNITYADS_GAME_ID" } ) -- Sometime later, check if an ad (placement ID) is ready for display print( unityads.isLoaded( "YOUR_UNITYADS_PLACEMENT_ID" ) )