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
MessageOptions.cs
1using System;
2using UnityEngine;
3
4namespace SCG.SpaceAdMobile
5{
10 [Serializable]
11 public class MessageOptions
12 {
14 [Tooltip("Enables the callback for when an ad generates revenue. The option is available only for Google AdMob.")]
15 public bool AdPaid;
17 [Tooltip("Enables the callback for when an ad impression is recorded.")]
20 [Tooltip("Enables the callback for when an ad successfully loads.")]
21 public bool AdLoaded;
23 [Tooltip("Enables the callback for when an ad fails to load, with an error parameter.")]
24 public bool AdLoadFailed;
26 [Tooltip("Enables the callback for when an ad is clicked.")]
27 public bool AdClicked;
29 [Tooltip("Enables the callback for when an ad is shown.")]
30 public bool AdShown;
32 [Tooltip("Enables the callback for when an ad is closed by the user.")]
33 public bool AdClosed;
35 [Tooltip("Enables the callback for when an ad fails to present content, with an error parameter.")]
36 public bool AdContentFailed;
38 [Tooltip("Enables the callback for when a reward is earned from interacting with an ad.")]
39 public bool AdReward;
40 }
41
45 public interface IAdPaidMessage
46 {
47#if GOOGLE_MOBILE_ADS
52#else
57#endif
58 void AdPaid(object adValue);
59 }
60
65 {
70 }
71
75 public interface IAdLoadedMessage
76 {
80 void AdLoaded();
81 }
82
86 public interface IAdLoadFailedMessage
87 {
88#if LEVELPLAY_MOBILE_ADS
93#elif GOOGLE_MOBILE_ADS
98#elif YANDEX_MOBILE_ADS
103#else
108#endif
109 void AdLoadFailed(object error);
110 }
111
115 public interface IAdClickedMessage
116 {
120 void AdClicked();
121 }
122
126 public interface IAdShownMessage
127 {
131 void AdShown();
132 }
133
137 public interface IAdClosedMessage
138 {
142 void AdClosed();
143 }
144
148 public interface IAdContentFailedMessage
149 {
150#if LEVELPLAY_MOBILE_ADS
155#elif GOOGLE_MOBILE_ADS
160#elif YANDEX_MOBILE_ADS
165#else
170#endif
171 void AdContentFailed(object error);
172 }
173
177 public interface IAdRewardMessage
178 {
179#if LEVELPLAY_MOBILE_ADS
184#elif GOOGLE_MOBILE_ADS
189#elif YANDEX_MOBILE_ADS
194#else
199#endif
200 void AdReward(AdRewardBase reward);
201 }
202}
Represents a backend-agnostic description of an ad reward.
bool AdImpressionRecorded
Enables the callback for when an ad impression is recorded.
bool AdClosed
Enables the callback for when an ad is closed by the user.
bool AdPaid
Enables the callback for when an ad generates revenue. The option is available only for Google AdMob.
bool AdShown
Enables the callback for when an ad is shown.
bool AdReward
Enables the callback for when a reward is earned from interacting with an ad.
bool AdLoadFailed
Enables the callback for when an ad fails to load, with an error parameter.
bool AdClicked
Enables the callback for when an ad is clicked.
bool AdLoaded
Enables the callback for when an ad successfully loads.
bool AdContentFailed
Enables the callback for when an ad fails to present content.
Defines options for enabling message callbacks related to ad events. These options allow you to subsc...
void AdClicked()
Handles the ad click.
Defines the callback invoked when an ad is clicked.
void AdClosed()
Handles the closed ad.
Interface defining the method to be invoked when an ad is closed by the user.
void AdContentFailed(object error)
Handles a failure to present ad content.
Interface defining the method to be invoked when an ad fails to present content, with an error parame...
Defines the callback invoked when an ad impression is recorded.
void AdImpressionRecorded()
Handles the recorded ad impression.
void AdLoadFailed(object error)
Handles an ad load failure.
Interface defining the method to be invoked when an ad fails to load, with an error parameter.
void AdLoaded()
Handles the successfully loaded ad.
Defines the callback invoked when an ad loads.
void AdPaid(object adValue)
Handles revenue generated by an ad when the active provider supports paid events.
Interface defining the method to be invoked when an ad generates revenue.
void AdReward(AdRewardBase reward)
Handles a reward earned from a rewarded ad.
Interface defining the method to be invoked when a reward is earned from interacting with an ad.
void AdShown()
Handles the displayed ad.
Interface defining the method to be invoked when an ad is shown.