Example #1
0
    // Use this for initialization
    void Start()
    {
        logger = FindObjectOfType(typeof(Logger)) as Logger;

        Ogury.Start(AndroidAssetKey, IosAssetKey);

        thumbnailAd = new OguryThumbnailAd(AndroidThumbnailAdUnitId,
                                           IosThumbnailAdUnitId);

        // get user consent
        OguryChoiceManager.OnAskComplete += OnCMComplete;
        OguryChoiceManager.OnAskError    += OnCMError;
        OguryChoiceManager.Ask();


        thumbnailAd.OnAdLoaded += ad =>
        {
            logger.LogAdLoadedMessage();
        };

        thumbnailAd.OnAdNotAvailable += ad =>
        {
            logger.LogAdNotAvailableMessage();
        };

        thumbnailAd.OnAdDisplayed += ad =>
        {
            logger.LogOnAdDisplayedMessage();
        };

        thumbnailAd.OnAdClosed += ad =>
        {
            logger.LogOnAdClosedMessage();
        };

        thumbnailAd.OnAdNotLoaded += ad =>
        {
            logger.LogAdNotLoadedMessage();
        };

        thumbnailAd.OnAdError += OnAdError;
    }
Example #2
0
 void OnAdError(OguryThumbnailAd oguryThumbnailAd, OguryError error)
 {
     logger.LogOnAdErrordMessage(String.Format("Ad Error {0} - {1}", error.ErrorCode, error.Description));
 }