I have imported the advertisement package from the package manager, turned the ads service on, and added a script:

string gameId = "correctGameId";
bool testAds = true;
void Start(){
    Advertisement.Initialize(gameId, testAds);

void Click (){

This Click function is called from a button's OnClick event.

Every time I play in the editor and click the button, nothing happens.

How can I make my advertisement show?

  • \$\begingroup\$ Do you see any output in your console log? Have you verified that the Click method is executing as expected? What value do you get from Advertisement.isInitialised inside that method? \$\endgroup\$ – DMGregory Aug 27 '20 at 14:56
  • \$\begingroup\$ No, no output in the console...... Also the button click function is executed properly...... \$\endgroup\$ – Robert Polomon Aug 27 '20 at 16:11
  • \$\begingroup\$ And the answer to my third question? Don't forget to document this information in your question so we can clear out unneeded comments. \$\endgroup\$ – DMGregory Aug 27 '20 at 16:14
  • \$\begingroup\$ False; from isInitialised; Always; \$\endgroup\$ – Robert Polomon Aug 28 '20 at 2:04
  • \$\begingroup\$ There we go. Next we'll need to figure out why the advertisements aren't initializing. How have you configured your ads so far? \$\endgroup\$ – DMGregory Aug 28 '20 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.