Space Ad Mobile 9.5.1
Space Ad Mobile makes ads easy to add into your mobile game: one unified workflow for LevelPlay, AdMob, Yandex.Ads across banners, interstitials and rewarded.
Loading...
Searching...
No Matches
AdBehaviour.cs
1using System;
2using UnityEngine;
3using UnityEngine.Serialization;
4
5namespace SCG.SpaceAdMobile
6{
10 [Serializable]
11 public class AdBehaviour
12 {
14 [FormerlySerializedAs("LoadOnEnabled")]
15 [Tooltip("Determines if ads should be automatically loaded when the object becomes enabled.")]
16 public bool AutoLoadOnEnable;
17
19 [FormerlySerializedAs("ReloadOnContentClosed")]
20 [Tooltip("Specifies whether ads should automatically reload after their content has been closed.")]
21 public bool ReloadAfterContentClosed = true;
22
24 [FormerlySerializedAs("ReloadOnContentFailed")]
25 [Tooltip("Indicates if ads should reload automatically upon a failed show attempt.")]
26 public bool ReloadAfterShowFailure = true;
27
29 [FormerlySerializedAs("ReloadOnFailed")]
30 [Tooltip("Determines if ads should reload automatically after a loading failure.")]
32
34 [FormerlySerializedAs("MaxFailedCount")]
35 [Tooltip("The maximum number of failed loading attempts before stopping automatic reloads.\n" +
36 "Only applies when ReloadAfterLoadFailure is true.")]
37 [Range(0, 10)]
38#if UNITY_EDITOR
39 // ReSharper disable once RedundantNameQualifier
40 [Editor.ShowIf(nameof(ReloadAfterLoadFailure))]
41#endif
42 public byte MaxLoadFailureAttempts = 1;
43
45 [FormerlySerializedAs("LoadIfNotReady")]
46 [Tooltip("Allows for the loading of an ad during a call to Show() if no ad is ready to display.")]
47 public bool LoadOnDemand;
48
50 [FormerlySerializedAs("AutoShowWhenLoaded")]
51 [Tooltip("Automatically displays an ad as soon as it is loaded.\n" +
52 "Caution: Enabling this along with automatic loading can create a loop of continual ad display.")]
54 }
55}
bool ReloadAfterContentClosed
Specifies whether ads should automatically reload after their content has been closed.
bool ReloadAfterShowFailure
Indicates if ads should reload automatically upon a failed show attempt.
byte MaxLoadFailureAttempts
The maximum number of failed loading attempts before stopping automatic reloads.
bool DisplayImmediatelyOnLoad
Automatically displays an ad as soon as it is loaded.
bool LoadOnDemand
Allows for the loading of an ad during a call to Show() if no ad is ready to display.
bool ReloadAfterLoadFailure
Determines if ads should reload automatically after a loading failure.
bool AutoLoadOnEnable
Determines if ads should be automatically loaded when the object becomes enabled.
Options and behaviors that control how ads are handled, loaded, and displayed.