Defines a generic abstract base class for ad unit objects, encapsulating common functionalities such as SDK initialization checks, system ad type information, ad caching, and ID management based on the platform and ad mode. This class serves as a foundation for implementing specific types of ad units across different platforms, handling critical tasks like ad object storage, logging initialization, option validation, internet connectivity checks, and platform-specific ID selection.
More...
|
| override void | Awake () |
| override void | OnEnable () |
| override void | OnDestroy () |
| override void | OnApplicationQuit () |
| bool | TryPrepareLoad () |
| | Performs shared loading preflight used by synchronous and asynchronous provider implementations. This method preserves the existing load lifecycle, including cache restoration, unload-before-load behavior, SDK readiness checks, and internet availability checks.
|
| override void | OnAdLoadedInternal () |
|
bool | LoadInternal () |
| SpaceAdLogger | InitLogger () |
| | Initializes and returns a logger.
|
| string | GetId () |
| | Determines and returns the appropriate ad ID based on the current platform and ad mode. This method supports different IDs for development and production environments across Android and iOS platforms. Returns an empty string when running in the Unity Editor.
|
| Protected Member Functions inherited from SCG.SpaceAdMobile.AdUnitHandlerBase |
| override void | OnAdPaid (object adValue) |
| | Raised when the AdObject is estimated to have earned money.
|
| virtual void | OnAdPaidInternal (object adValue) |
| override void | OnAdImpressionRecorded () |
| | Raised when an impression is recorded for an AdObject.
|
| virtual void | OnAdImpressionRecordedInternal () |
| override void | OnAdLoaded () |
| | Raised when the AdObject is loaded.
|
| override void | OnAdLoadFailed (object error) |
| | Raised when loading of the AdObject is failed.
|
| virtual void | OnAdLoadFailedInternal (object error) |
| override void | OnAdClicked () |
| | Raised when a click is recorded for an AdObject.
|
| virtual void | OnAdClickedInternal () |
| override void | OnAdShown () |
| | Raised when an AdObject opened full screen content.
|
| virtual void | OnAdShownInternal () |
| override void | OnAdClosed () |
| | Raised when the AdObject closed full screen content.
|
| virtual void | OnAdClosedInternal () |
| override void | OnAdContentFailed (object error) |
| | Raised when the AdObject failed to open full screen content.- Parameters
-
|
| virtual void | OnAdContentFailedInternal (object error) |
| override void | OnUserEarnedReward (AdRewardBase reward) |
| | Raised when the AdObject rewarded the user.- Parameters
-
|
| virtual void | OnUserEarnedRewardInternal (AdRewardBase reward) |
| override void | OnDestroy () |
| | Releases resources during Unity's destroy callback.
|
|
void | OnLoadFromCache () |
| | Method to be called when the object is loaded from the cache. It needs to subscribe to needed events.
|
|
void | OnAttachToCache () |
| | Method to be called when the object is attached to the cache. It needs to unsubscribe from events it previously subscribed to.
|
|
void | RegisterEventHandlers () |
| | To further customize the behavior of your ad, you can hook into a number of events in the ad's lifecycle: opening, closing, and so on. Listen for these events by registering a delegate as shown below.
|
| virtual void | OnInternetNotAvailable () |
| | Raised when the Internet connection isn't available. Can be overridden to handle this scenario.
|
| virtual System.IDisposable | AcquireFullscreenAdAudio () |
| | Acquires the audio policy for a fullscreen ad show.
|
| void | ReleaseFullscreenAdAudio () |
| | Releases the audio policy for the current fullscreen ad show.
|
| void | AcquireFullscreenAdAudioLease () |
| | Replaces the current fullscreen audio lease with a new one.
|
|
void | Awake () |
| | Initializes the component during Unity's Awake callback.
|
|
void | OnEnable () |
| | Handles the Unity enable callback.
|
|
void | OnDestroy () |
| | Releases resources during Unity's destroy callback.
|
|
void | OnApplicationQuit () |
| | Handles application shutdown.
|
| virtual void | UnityAwake () |
| | Unity Awake.
|
| virtual void | UnityOnEnable () |
| | Unity OnEnable.
|
| virtual void | UnityOnDestroy () |
| | Unity OnDestroy.
|
| virtual void | UnityOnApplicationQuit () |
| | Unity OnApplicationQuit.
|
|
void | ShowInternal () |
| | Internal method for showing an ad. Must be implemented to handle the specific showing logic.
|
|
void | DestroyInternal () |
| | Internal method for unloading an ad. Must be implemented to handle the specific unloading logic.
|
| virtual void | OnUnload () |
| | Called when an ad is unloaded. Can be overridden to perform clean-up or other logic when the ad is no longer needed.
|
|
| TAd | AdObject [get, protected set] |
| | The ad object associated with this unit. This property allows for direct interaction with the specific ad's functionalities.
|
| override AdBehaviour | AdBehaviour [get] |
| override MessageOptions | MessageOptions [get] |
| virtual AdvertisingOptions | Options [get, set] |
| virtual IInternetConnectionChecker | InternetConnection [get, set] |
| virtual LogOptions | LogOptions [get] |
| SpaceAdLogger | Logger [get] |
| virtual bool | ShouldUnloadOnLoad [get] |
| | Determines whether the ad object should be unloaded when loading a new ad instance. When set to true, the current ad will be unloaded upon loading a new one.
|
| virtual bool | ShouldUnloadOnShow [get] |
| | Determines whether the ad object should be treated as unavailable after being shown. When set to true, the current ad will no longer be considered ready after a successful show.
|
| bool | SdkInitialized [get] |
| | Indicates if the necessary SDK has been properly initialized. This is critical for ensuring that ad operations are only attempted when the SDK is ready.
|
| Type | SystemAdType [get] |
| | Stores the type of the system ad, facilitating reflection and type-specific operations.
|
| string | SystemAdTypeName [get] |
| | A convenient string representation of the system ad type, used primarily for logging and debugging purposes.
|
| override AdType | AdType [get] |
| | Gets the common advertising format exposed by this ad unit.
|
| AdBehaviour | AdBehaviour [get] |
| | Behavior options for displaying and showing ads.
|
| MessageOptions | MessageOptions [get] |
| | Options for enabling Unity SendMessage methods.
|
| string | TestAndroidId [get] |
| | Gets the Android test ad unit identifier for the active provider.
|
| string | TestIOSId [get] |
| | Gets the iOS test ad unit identifier for the active provider.
|
| AdType | AdType [get] |
| | Gets the common advertising format exposed by this ad unit.
|
Defines a generic abstract base class for ad unit objects, encapsulating common functionalities such as SDK initialization checks, system ad type information, ad caching, and ID management based on the platform and ad mode. This class serves as a foundation for implementing specific types of ad units across different platforms, handling critical tasks like ad object storage, logging initialization, option validation, internet connectivity checks, and platform-specific ID selection.
Definition at line 16 of file AdUnit.cs.