Define the ad scene||doc136057

September 20, 2022

Format

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

Description

The advertisement scene is defined according to the scene name, which is generally defined first when the client is initialized.


Precautions

  • Only a maximum of 9 ad scenarios can be defined

Parameters

Variable name type Description
place string scene name


Code Samples

Define two ad scenarios in the client

local AdHelper = Game.GetService("AdHelper")
AdHelper:defineAdPlace('place1')
AdHelper:defineAdPlace('place2')