Ad Entry Status||doc136061

September 20, 2022

Format

 AdHelper:canEnableVideoAd()
  • The class to which the function belongs:AdHelper

Description

Returns whether the viewing advertisement entrance is open


Value Returned

type Description
boolean Whether the viewing advertisement entrance is open


Code Samples

If the viewing advertisement entrance is open, open the ui related to the advertisement

local AdHelper = Game.GetService("AdHelper")
local canEnableVideoAd =  AdHelper:canEnableVideoAd()
if canEnableVideoAd then
    UI:openWindow("advertisingWnd")
end