Immersive Ads SDK
v2.1.0
v2.1.0
  • 👋Welcome to Immersive Ads 2
  • Prerequisites
    • 📪Prerequisites
    • 🧙Demand Source setup
  • Integration
    • ⬇️Adding the SDK
    • 🔗App Linking
    • 🎬Scene setup
    • 🩺Testing the integration
    • ☑️Integration Checklist
    • 🛠️Troubleshoot
  • PRESENTATION
    • 🍕Important Changes
    • 🍥Ad Object Structure
    • 🍧Changing Ad Visuals
    • 🍨Extra Display Templates
  • SCRIPTING API
    • 🏓PubScaleManager
    • ⚽NativeAdHolder
  • 🔮Samples
Powered by GitBook
On this page
  1. SCRIPTING API

🏓PubScaleManager

PreviousExtra Display TemplatesNextNativeAdHolder

Last updated 8 days ago

CtrlK
  • Properties
  • Static Methods

The PubScaleManager handles initialization and all the requests and response caching for ads. It is a singleton component that can be accessed from anywhere. Native ads won't work if this component is missing from the scene.

Properties

Name
Description

IsInitialized

Use to check if the PubScale SDK is initialized

Static Methods

Name
Description

SetActiveCameraForMeasurement

By default, the SDK uses the camera with the highest depth for measurement. In scenes with multiple cameras, this default camera might not be the one rendering the primary game screen from the player's perspective.

If the wrong camera is used for measurement, the SDK cannot determine if the ad is viewable, which prevents impressions from being reported. It can also cause the ad to be unclickable.

Use this method to explicitly set the camera that is aligned with the player's view

SetSdkToRemoveAdsPurchasedForThisSession

Use this API to adjust SDKs behaviour when Remove Ads IAP is active for a session. The SDK does not persist this information as Remove Ads can be permanent or part of a time based subscription. This API needs to be set on app open every session when RemoveAds is active

RegisterFriendlyObstruction

You can register up to 2 UI GameObjects that the SDK will ignore as obstructions when the user clicks on an ad in the game with the intention of clicking through. A friendly UI object example could be a virtual joystick that appears on the screen wherever the user taps.

UnRegisterFriendlyObstruction

Use this method to un-register a UI gameobject previously registered as a friendly object.