Class RewardedVideoAd
public class RewardedVideoAd : IAdFullScreen, IAd, IAdLoadRetryHandler
Implements:
MatchinghamGames.VegasModule.IAdFullScreen, MatchinghamGames.VegasModule.IAd, MatchinghamGames.VegasModule.IAdLoadRetryHandler
Properties
Enabled
If rewarded video is enabled
public bool Enabled { get; }
IsLoaded
If rewarded video is loaded
public bool IsLoaded { get; }
IsLoading
If rewarded video is loading now
public bool IsLoading { get; }
IsShowing
If rewarded video is showing now
public bool IsShowing { get; }
RetryAttempt
public int RetryAttempt { get; set; }
Data
Current data of the rewarded video
public AdDTO Data { get; }
RevenueData
Current revenue data of the rewarded video
public AdRevenueDTO RevenueData { get; }
ErrorData
Current error data of the rewarded video
public AdErrorDTO ErrorData { get; }
Methods
Initialize()
public void Initialize()
Load()
Load rewarded video manually
public void Load()
Show(string)
public void Show(string adTag)
Parameters
Type | Name |
---|---|
System.String | adTag |
Show(Action, Action, string)
Show rewarded video manually
public void Show(Action onSuccessCallback = null, Action onFailCallback = null, string adTag = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action | onSuccessCallback | An action to be invoked, if user watches the rewarded video till the end. |
System.Action | onFailCallback | An action to be invoked, if user didn't watch or abort the rewarded video. |
System.String | adTag | Tag of the rewarded video. If you don't have, leave it. Default is null. |
Events
FailedToLoad
Invokes when rewarded video fails to load
public event Action FailedToLoad
Event Type
System.Action
Loaded
Invokes when rewarded video is loaded
public event Action Loaded
Event Type
System.Action
LoadedStatusChanged
Invokes when rewarded video load status is changed
public event Action LoadedStatusChanged
Event Type
System.Action
FailedToShow
Invokes when rewarded video fails to be opened
public event Action FailedToShow
Event Type
System.Action
Shown
Invokes when rewarded video is opened
public event Action<AdDTO> Shown
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO>
Closed
Invokes when rewarded video is closed. Parameter is if user watched it or not
public event Action<bool> Closed
Event Type
System.Action<System.Boolean>
Clicked
Invokes when rewarded video is clicked
public event Action Clicked
Event Type
System.Action
AdDataObtained
Invokes when a rewarded video ad data is obtained
public event Action<AdDTO> AdDataObtained
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO>
RevenueDataObtained
Invokes when a rewarded video ad revenue data is obtained
public event Action<AdDTO, AdRevenueDTO> RevenueDataObtained
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO,MatchinghamGames.VegasModule.AdRevenueDTO>
ErrorDataObtained
Invokes when a rewarded video ad error data is obtained
public event Action<AdDTO, AdErrorDTO> ErrorDataObtained
Event Type
System.Action<MatchinghamGames.VegasModule.AdDTO,MatchinghamGames.VegasModule.AdErrorDTO>