Appstock for Unity
  • Documentation
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • AppstockSDK.Android
      • IJavaEnum
      • SdkEnums
      • SdkImp
    • AppstockSDK.Api
      • AdElementPosition
      • AdError
      • AdFormat
      • AdInfo
      • AdPosition
      • AdReward
      • AdSize
      • AnchoredAdPosition
      • Appstock
      • BannerAd
      • BannerAdPositionExtensions
      • ExtSlot
      • ExtSlot.Mode
      • ExternalUserID
      • IAdEventSource
      • IAdUnit
      • IAnchoredAd
      • IAutoRefreshableAd
      • IBannerAd
      • ICloseableAd
      • IConcealableAd
      • IInterstitialAd
      • ILoadableAd
      • IModalAd
      • IModalAdEventSource
      • IMonoformattedAd
      • IMultiformattedAd
      • IMuteableAd
      • INativeAdLoader
      • IResizableAd
      • IRewardedAd
      • IRewardingAdEventSource
      • ISdkProxy
      • ISkippableAd
      • ITargetingProxy
      • InterstitialAd
      • LogLevel
      • OptionalBool
      • OptionalBoolExtensions
      • RewardedAd
      • SdkConfig
      • SdkConfigSnapshot
      • SdkProxyExtensions
      • SerializableOptional<T>
      • TargetingData
      • TargetingProxyExtensions
    • AppstockSDK.Api.Native.Data.Request
      • AdUnitData
      • AdUnitDataExtensions
      • AssetData
      • AssetData.DataType
      • AssetImage
      • AssetImage.ImageType
      • AssetTitle
      • Assets
      • ConfigWarnings
      • EventTracker
      • EventTracker.EventType
      • EventTracker.TrackingMethod
      • EventTrackers
      • Parameters
      • Parameters.ContextSubType
      • Parameters.ContextType
      • Parameters.PlacementType
    • AppstockSDK.Api.Native.Data.Response
      • DataContentType
      • IDataContent
      • IImageContent
      • INativeAd
      • ITitleContent
      • ImageContentType
    • AppstockSDK.Common
      • ISdkImp
      • ISdkInitializer
    • AppstockSDK.Editor
      • ExtSlotPropertyDrawer
      • NativeConfigWarningsPropertyDrawer
      • SerializableOptionalPropertyDrawer
    • AppstockSDK.Unity
      • SdkImp
    • AppstockSDK.iOS
      • SdkImp

    Class RewardedAd

    Rewarded ads reward users with in-app items for interacting with video ads, playable ads, or surveys.

    Inheritance
    object
    RewardedAd
    Implements
    IRewardedAd
    IDisposable
    IAdUnit
    IMultiformattedAd
    IResizableAd
    IMuteableAd
    ICloseableAd
    IModalAd
    ILoadableAd
    IAdEventSource
    IModalAdEventSource
    IRewardingAdEventSource
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: AppstockSDK.Api
    Assembly: Appstock.Api.dll
    Syntax
    public class RewardedAd : IRewardedAd, IDisposable, IAdUnit, IMultiformattedAd, IResizableAd, IMuteableAd, ICloseableAd, IModalAd, ILoadableAd, IAdEventSource, IModalAdEventSource, IRewardingAdEventSource

    Constructors

    RewardedAd()

    Initializes a new instance of the RewardedAd class.

    Declaration
    public RewardedAd()

    Properties

    AdSizes

    Sets ad sizes for the ad.

    Declaration
    public IEnumerable<AdSize> AdSizes { set; }
    Property Value
    Type Description
    IEnumerable<AdSize>

    Sizes that ad's content may take.

    AdUnitFormats

    Sets formats for the ad unit.

    Declaration
    public IEnumerable<AdFormat> AdUnitFormats { set; }
    Property Value
    Type Description
    IEnumerable<AdFormat>

    Ad formats that are allowed into the ad.

    CloseButtonArea

    Sets close button area factor.

    Declaration
    public double CloseButtonArea { set; }
    Property Value
    Type Description
    double

    the percentage of the device screen that the close button should cover.

    Remarks

    Allowed range - 0...1.

    Default value is ~0.1.

    CloseButtonPosition

    Sets position of the close button.

    Declaration
    public AdElementPosition CloseButtonPosition { set; }
    Property Value
    Type Description
    AdElementPosition

    Where the close button appears on the screen.

    Remarks

    Allowed values: TopLeft, TopRight.

    Default is TopRight.

    EndpointID

    Sets the endpoint ID for the ad.

    Declaration
    public string? EndpointID { set; }
    Property Value
    Type Description
    string

    Unique endpoint identifier generated on the Appstock platform’s UI.

    Loaded

    Gets if ad has loaded.

    Declaration
    public bool Loaded { get; }
    Property Value
    Type Description
    bool

    true if ad has successfully loaded, false otherwise.

    Muted

    Sets if ad is to be muted.

    Declaration
    public bool Muted { set; }
    Property Value
    Type Description
    bool

    true if muted, false otherwise.

    PlacementID

    Sets the placement ID for the ad.

    Declaration
    public string? PlacementID { set; }
    Property Value
    Type Description
    string

    Unique placement identifier generated on the Appstock platform’s UI.

    SoundButtonVisible

    Sets if Mute button is visible when the ad is on display.

    Declaration
    public bool SoundButtonVisible { set; }
    Property Value
    Type Description
    bool

    true if visible, false otherwise.

    Methods

    Dispose()

    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

    Declaration
    public void Dispose()

    Dispose(bool)

    Releases the unmanaged resources used by the class and optionally releases the managed resources.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing

    true to release both managed and unmanaged resources; false to release only unmanaged resources.

    ~RewardedAd()

    Declaration
    protected ~RewardedAd()

    LoadAd()

    Load the content of the ad.

    Declaration
    public void LoadAd()

    Show(Action?)

    Show the ad on screen.

    Declaration
    public void Show(Action? actionOnUIThread = null)
    Parameters
    Type Name Description
    Action actionOnUIThread

    Something you want to execute immediately when the ad is being added to the screen

    actionOnUIThread is invoked on NATIVE UI THREAD which MAY DIFFER from UNITY'S MAIN THREAD.

    Events

    OnAdClicked

    Fired when ad was clicked on.

    Declaration
    public event Action? OnAdClicked
    Event Type
    Type Description
    Action

    OnAdClosed

    Fired when ad was closed (from fullscreen mode).

    Declaration
    public event Action? OnAdClosed
    Event Type
    Type Description
    Action

    OnAdDisplayed

    Fired when ad did appear on screen.

    Declaration
    public event Action? OnAdDisplayed
    Event Type
    Type Description
    Action

    OnAdFailed

    Fired when ad failed to load.

    Declaration
    public event Action<AdError?>? OnAdFailed
    Event Type
    Type Description
    Action<AdError?>

    OnAdLoaded

    Fired when ad finished loading.

    Declaration
    public event Action<AdInfo?>? OnAdLoaded
    Event Type
    Type Description
    Action<AdInfo?>

    OnReward

    Fired when user deserved the reward.

    Declaration
    public event Action<AdReward?>? OnReward
    Event Type
    Type Description
    Action<AdReward?>

    Implements

    IRewardedAd
    IDisposable
    IAdUnit
    IMultiformattedAd
    IResizableAd
    IMuteableAd
    ICloseableAd
    IModalAd
    ILoadableAd
    IAdEventSource
    IModalAdEventSource
    IRewardingAdEventSource
    In this article
    Back to top Generated by DocFX