16 internal static event Action ApplicationQuit;
19 [Tooltip(
"General configuration options for ad display, testing, and SDK initialization.")]
23 [Tooltip(
"Connectivity strategy. 'Simple' is default (fast on mobile, no network I/O). 'Request' performs an HTTP HEAD check.")]
33 set => internetConnection = value ?? internetConnection;
52 _ =>
throw new ArgumentOutOfRangeException()
65 if (!RuntimePlatformGuard.EnsureSupported())
return;
77 ApplicationQuit?.Invoke();
81 ApplicationQuit =
null;
99 AdOptions.RegisterDeviceAsTest =
true;
102 if (Application.installMode == ApplicationInstallMode.Store)
104 AdOptions.AdMode = AdOptions.RegisterDeviceAsTest
105#if !YANDEX_MOBILE_ADS
106 ? AdMode.MarkProductionAsTest
114 if (
AdOptions.KeepDevelopmentAdsInDevelopmentBuild)
115 AdOptions.AdMode =
AdMode.Development;
123 [ContextMenu(
"Restore log options")]
Defines general configuration options for ad display, testing, and SDK initialization.
Network I/O–based checker issuing an HTTP HEAD request to a configurable URL. Provides higher confide...
Lightweight checker based on Application.internetReachability. Optimized for mobile devices where it ...
static AdvertisingOptions Options
General configuration options for ad display, testing, and SDK initialization.
CheckInternetConnectionType CheckInternetConnectionType
Connectivity strategy. 'Simple' is default (fast on mobile, no network I/O). 'Request' performs an HT...
virtual void Start()
Initializes the advertising system by validating the current options and then starting the ad system ...
void RestoreLogOptions()
Restores the default logging options for the ad system. This can be useful for resetting the log sett...
static IInternetConnectionChecker InternetConnection
Pluggable internet checker instance. Assign a custom implementation if needed; null assignments are i...
virtual void Awake()
Sets the initial advertising options when the object awakens.
AdvertisingOptions AdOptions
General configuration options for ad display, testing, and SDK initialization.
virtual void Validate()
Validates the current ad settings, adjusting the ad mode based on the application's install mode and ...
virtual void OnApplicationQuit()
Clears the advertising options when the application quits to ensure that no unwanted settings persist...
Base class of the main SpaceAd mobile advertising manager. It provides a framework for initializing a...
void InitializeAdSystem()
Initializes the advertising system. Implementations of this method should handle specific initializat...
Contract for pluggable internet connectivity checkers. Implementations should return true when the ne...
AdMode
Enumerates options for ad testing types, affecting whether real or test ads are displayed.
@ Request
Performs an actual network call (HTTP HEAD) to a known endpoint. More accurate but slower and can be ...
@ Simple
Uses Unity's Application.internetReachability signal. Fast and battery-friendly on mobile devices; re...