Пример #1
0
    void Start()
    {
        AdOptions adOptions = new AdOptionsBuilder()
                              .SetChannelId(GlobleSettings.GetChannelId)
                              .build();

        windowAd                   = new WindowAd(GlobleSettings.GetAppID, GlobleSettings.GetWindowAdUnitID, gameObject, adOptions);
        windowAd.OnAdLoaded       += HandleWindowAdLoaded;
        windowAd.OnAdFailedToLoad += HandleWindowAdFailedToLoad;
        windowAd.OnAdStarted      += HandleWindowAdStart;
        windowAd.OnAdClicked      += HandleWindowAdClicked;
        windowAd.OnAdFinished     += HandleWindowAdFinished;
        windowAd.OnAdClosed       += HandleWindowAdClosed;
        windowAd.OnAdFailToShow   += HandleWindowAdFailToShow;
    }