Detect whether the player has an ad blocker enabled. This is informational only: it does not suppress ads, but it lets you adapt UI, skip empty banner slots, or show a polite prompt.
Call this when you need to adapt ad-related UI for players with blocked ads.
bridge.advertisement.checkAdBlock().then(result=>{console.log(result) // true or false}).catch(error=>{console.log(error)})
privatevoidStart(){Bridge.advertisement.CheckAdBlock(OnCheckAdBlockCompleted);}privatevoidOnCheckAdBlockCompleted(boolresult){Debug.Log(result);// true or false}
playgama_bridge_advertisement_check_adblock()
// callback via Async Social Event
if async_load[? "type"] == "playgama_bridge_advertisement_check_adblock_callback" {
if async_load[? "success"] {
var is_adblock_detected = async_load[? "data"]
}
}
local bridge = require("bridge.bridge")
function init(self)
bridge.advertisement.check_ad_block(function (_, data)
print("Is adblock detected: ", data)
end,
function ()
-- error
end)
end