Skip to content

Instantly share code, notes, and snippets.

@aldidoanta
Last active January 18, 2016 09:31
Show Gist options
  • Save aldidoanta/0b9880b47216709842b7 to your computer and use it in GitHub Desktop.
Save aldidoanta/0b9880b47216709842b7 to your computer and use it in GitHub Desktop.

#TT-Advertisement Documentation

This module must be installed using [Touchten Framework Wizard] (https://gist.github.com/aldidoanta/a263c75eebc21319a7f4#installation-instructions-using-touchten-framework-wizard).

Notes
Don't init this module manually, unless you know what you are doing.
All initialization sequence is handled by TT-Core.

TT-Advertisement Settings in Unity

Vmax

  • In Unity Editor menu bar, open Touchten Settings > Edit Vmax Ads Settings.
  • Ask Release Manager (Dino) for the required IDs.

Unity Ads

  • In Unity Editor menu bar, open Touchten Settings > Edit Unity Ads Settings.
  • Open Services tab by clicking the cloud button, located near the top-right corner of the editor.
  • Sign in using account obtained from Release Manager (Dino), Dede, or Phoen.
  • Link the project, turn on the ads.

###Table of Contents

Examples
[Abstract Classes] (#abstract-classes)
Classes in TT-Advertisement
ChangeLog


###Method Usage Examples

Add namespace

using Touchten.Ads

Using Delegate as Callback

TTAds.Banner.Show (VmaxAdsSettings.BannerAdsId, delegate(object sender, AdsResult e) {
    Debug.Log(e.IsSuccess);
});

TTAds.Interstitial.Destroy(INTERSTITIAL_VMX_01);

###Abstract Classes AdsResult
Field:

bool IsSuccess { get; set; }
Exception Error { get; set; }

VideoAdsResult
Field:

bool IsShowComplete { get; set; }

###Classes

####TTAds.Banner

Method:

void Show (string adsId,  EventHandler<AdsResult> callback = null)
void Destroy (string adsId)

####TTAds.Interstitial

Method:

void Show (string adsId, EventHandler<AdsResult> callback = null)
void Cache(string adsId)
void Destroy (string adsId)

####TTAds.Video

Method:

void Show (string adsId, ClosedVideoHandler OnVideoComplete, ClosedVideoHandler OnVideoClosed, EventHandler<VideoAdsResult> callback = null)

##ChangeLog version 1.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment