【Unity マネタイズ】使えるゲーム広告
1.Google Admob
- Androidアプリで広告収入を得る方法 「AdMob」 | mucchinのAndroid戦記
- UnityでインターステイシャルなAdMob | 電脳ノート
- Mobile App Monetization, Analysis & Mediation – Google AdMob
public void RequestBanner() { // Google AdMobからIDを作る!! #if UNITY_ANDROID string adUnitId = androidBannerUnitId; #elif UNITY_IPHONE string adUnitId = iosBannerUnitId; #else string adUnitId = "unexpected_platform"; #endif // Create a 320x50 banner at the top of the screen. bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Bottom); // Create an empty ad request. //AdRequest request = new AdRequest.Builder().AddTestDevice(testDeviceId).Build(); AdRequest request = new AdRequest.Builder().Build(); // Load the banner with the request. bannerView.LoadAd(request); }
2.nend
3.Chartboost
1. サイトからIDを取得
2. SDKをダウンロード
Grow mobile game revenue with Chartboost
using UnityEngine; using System.Collections; using ChartboostSDK; public class ChartBoostManager : MonoBehaviour { public static ChartBoostManager instance = null; void Awake(){ if(instance ==null){ instance = this; } } void Start () { // ダウンロードを表示する前にする Chartboost.cacheInterstitial(CBLocation.Default); } // 呼び出すときに使う関数 public void ShowCBAds(){ // あるかどうか確認する if(Chartboost.hasInterstitial(CBLocation.Default)) { // 表示する Chartboost.showInterstitial(CBLocation.Default); } else { // 一秒後にもう一度呼び出す Invoke("ShowCBAds",1f); } } }
4.Unity Ads
関連記事