ドキュメント

Development

User Acquisition

Monetization

産業

Unity Ads Monetization

Unity Ads Android SDK

Unity Ads iOS SDK

Unity Ads SDK

Unity Ads Monetization

Unity Ads Monetization
​
​
Unity 開発者ガイド
  • Unity SDK の概要
  • Unity Ads SDK for Unity のインストール
  • Unity での SDK の初期化
  • Unity でのインタースティシャル広告の実装
  • Unity でのリワード広告の実装
  • Unity でのバナー広告の実装
Unity Ads API リファレンス
  • Unity Ads for Unity API リファレンス (C#)
  1. ゲームの成長
  2. Unity Ads
  3. Unity 開発者向け Unity Ads SDK インテグレーションガイド

Unity でのインタースティシャル広告の実装

Unity プロジェクトにインタースティシャル広告を実装します。ゲームのモーメントまたはアプリケーション遷移の間に、C# スクリプトを使用して広告コンテンツをロードし、表示します。
読み終わるまでの所要時間 3 分
最終更新 6日前

Advertisements API
を使用して全画面のインタースティシャル広告を表示するには、SDK を初期化した後に、
Load
関数を使用して広告コンテンツを 広告ユニット にロードし、
Show
関数を使用して広告を表示します。
注
SDK バージョン 4.4.1 から、Unity Ads パッケージは Unity エディターで Advertisement Legacy パッケージと呼ばれるようになりました。 Advertisement Legacy パッケージのバージョン 4.12 は引き続き機能しますが、新機能や拡張機能のアップデートを受けることはできません。 SDK バージョン 4.12 では Apple プライバシーマニフェストの更新がサポートされており、パッケージの更新は今後予定されていません。
SDK バージョン 3.7.0 以降では、
IUnityAdsLoadListener
コールバックと
IUnityAdsShowListener
コールバックを使用して、それぞれコンテンツのロードまたは表示が成功または失敗したときのためのロジックを実装できます。
注
Show
メソッドを呼び出すときは、プレースメント ID を指定する必要があります。指定しない場合、エラーが発生します。

インタースティシャル広告の例

using UnityEngine;using UnityEngine.Advertisements;public class InterstitialAdExample : MonoBehaviour, IUnityAdsLoadListener, IUnityAdsShowListener{ [SerializeField] string _androidAdUnitId = "Interstitial_Android"; [SerializeField] string _iOSAdUnitId = "Interstitial_iOS"; string _adUnitId; void Awake() { // Get the Ad Unit ID for the current platform: _adUnitId = (Application.platform == RuntimePlatform.IPhonePlayer) ? _iOSAdUnitId : _androidAdUnitId; } // Load content to the Ad Unit: public void LoadAd() { // IMPORTANT!コンテンツのロードは初期化した後にのみ行ってください (この例では、初期化は別のスクリプトで処理されています)。 Debug.Log("Loading Ad: " + _adUnitId); Advertisement.Load(_adUnitId, this); } // Show the loaded content in the Ad Unit: public void ShowAd() { // Note that if the ad content wasn't previously loaded, this method will fail Debug.Log("Showing Ad: " + _adUnitId); Advertisement.Show(_adUnitId, this); } // Implement Load Listener and Show Listener interface methods: public void OnUnityAdsAdLoaded(string adUnitId) { // Optionally execute code if the Ad Unit successfully loads content. } public void OnUnityAdsFailedToLoad(string _adUnitId, UnityAdsLoadError error, string message) { Debug.Log($"Error loading Ad Unit: {_adUnitId} - {error.ToString()} - {message}"); // Optionally execute code if the Ad Unit fails to load, such as attempting to try again. } public void OnUnityAdsShowFailure(string _adUnitId, UnityAdsShowError error, string message) { Debug.Log($"Error showing Ad Unit {_adUnitId}: {error.ToString()} - {message}"); // Optionally execute code if the Ad Unit fails to show, such as loading another ad. } public void OnUnityAdsShowStart(string _adUnitId) { } public void OnUnityAdsShowClick(string _adUnitId) { } public void OnUnityAdsShowComplete(string _adUnitId, UnityAdsShowCompletionState showCompletionState) { }}
次のステップ: 実装を改善するには、Unity でのリワード広告の実装 に関するドキュメントを参照してください。

Copyright © 2026 Unity Technologies
法規事項プライバシーポリシークッキーDocumentation Terms of Use私の個人情報を販売または共有しないプライバシーに関する選択 (クッキー設定)

"Unity" の名称、Unity のロゴ、およびその他の Unity の商標は、米国およびその他の国における Unity Technologies またはその関係会社の商標または登録商標です (詳しくはこちら)。その他の名称またはブランドは該当する所有者の商標です。

一部のページは利便性向上のため機械翻訳を使用しており、内容に不正確な表現が含まれる場合があります。内容に齟齬または不一致が生じた場合は、英語版を正本とします。

  • このページ
    • インタースティシャル広告の例


このページの問題を報告する
​
​