Question by
RyanAtEvno · May 21, 2020 at 01:53 PM ·
c#advertising
Unity Advertising testMode?
So everything I see shows testMode = true. Do I set it to false before publishing? I mean in my script, not on Unity dashboard.
readonly bool testMode = true;
readonly string myPlacementId = "video";
public Button myButton;
void Start()
{
//myButton = GetComponent<Button>(); I willl assign myself?
// Set interactivity to be dependent on the Placement’s status:
myButton.interactable = Advertisement.IsReady(myPlacementId);
// Map the ShowRewardedVideo function to the button’s click listener:
if (myButton) myButton.onClick.AddListener(ShowRewardedVideo);
Advertisement.AddListener(this);
Advertisement.Initialize(gameId, testMode);
Comment