Construct 3 icon

Construct 3


pubCenter ads

Ashley's avatar
Construct Team Founder
Published 24 Aug, 2017
343 words
~1-2 mins

The pubCenter object displays ads in Windows Store apps (for Windows 10+). This service only works when using the UWP (Universal Windows Platform) export option for Windows 10+.

Setting up

To set up pubCenter ads:

  1. Visit the Microsoft Dev Center Dashboard (register an account if necessary)
  2. Create a new app to monetize
  3. Create an ad unit for the app
  4. Paste the Application ID and Ad unit ID in to the pubCenter object's properties in Construct

In the exported Visual Studio project you'll also need to:

  1. Install the Microsoft Advertising SDK, and add a reference to it in the Visual Studio project
  2. Add the WinJS NuGet package
  3. Change the build type from Any CPU to x64 (or x86 if you are on a 32-bit system)

pubCenter properties

Application ID

Ad unit ID

Paste in the relevant details from the pubCenter site.

pubCenter conditions

Is banner showing

True if any banner is currently showing.

On interstitial cancelled

Triggered when a displaying interstitial ad is cancelled.

On interstitial completed

Triggered when a displaying interstitial ad is completed.

On interstitial error

Triggers when an error occurs displaying an interstitial ad.

On interstitial ready

Triggers after Prepare interstitial when an interstitial ad has finished loading in the background and is ready to be displayed. After this trigger you can use Show interstitial to display it.

pubCenter actions

Hide banner ad

Hide any currently showing banner.

Show banner ad

Display an ad with a given position and size.

Prepare interstitial

Start loading an interstitial ad in the background. When it finishes loading, On ready triggers. Optionally another ad unit ID can be provided. If left empty, it will use the ad unit ID from the object's properties. Otherwise it uses the specified ad unit ID for the interstitial. You can also choose between a video interstitial or a banner interstitial.

Show interstitial

Display an interstitial ad that is ready. This should be used in or after On ready.

pubCenter expressions

The pubCenter object has no expressions.