기술 자료

Development

User Acquisition

Monetization

산업 분야

Unity Ads Monetization

SDK 4.20.0

지원 가능
​

Unity API reference

Unity Ads Monetization

SDK 4.20.0

지원 가능
​

이 페이지는 선택한 언어로 제공되지 않습니다.
Unity developer guides
​
​
Unity developer guides
  • Unity SDK integration guide
  • Unity Ads privacy guide
  • Unity Ads SDK troubleshooting guide
  • Unity developer API references
  1. Unity Ads SDK Unity developer monetization
  2. Unity Ads SDK integration guide for Unity developers

Implement rewarded ads in Unity

Implement rewarded ads in your Unity project. Load ad content, display it through C# scripts, and grant in-game rewards upon ad completion.
읽는 시간 3분
최근 업데이트: 한 달 전

Rewarding players for watching ads increases user engagement, resulting in higher revenue. For example, games might reward players with in-game currency, consumables, additional lives, or experience-multipliers. For more information on how to effectively design your rewarded ads, refer to the Monetization strategy documentation.
참고
Starting April 1, 2026, apps that monetize with Unity Ads through direct integration through the Advertisement Legacy Package might see reduced ad performance. To avoid reduction in performance, switch to integrating Unity Ads as a bidder.
The Unity Ads network will continue to support and provide fill for all apps using direct integration. However, to maximize revenue and performance, the recommended best practice is to install the Ads Mediation package for LevelPlay, Unity's ad mediation platform.
To reward players for completing a video ad, implement a callback method using the
ShowResult
result to check if the user finished the ad and should be rewarded.

Rewarded ad buttons

Using a button that prompts the player to opt in to watching an ad is a common implementation for rewarded video ads. Use the example code in the following steps to create a rewarded ads button. The button displays an ad when pressed, as long as ad content is available.

Rewarded video ad example

To configure a button in the Unity Editor:
  1. Select Game Object > UI > Button to add a button to your Scene.
  2. Select the button you added to your Scene, then add a script component to it using the Inspector (Add Component > New Script). Name the script
    RewardedAdsButton
    to match the class name.
  3. Open the script and add the following code:
using UnityEngine;using UnityEngine.UI;using UnityEngine.Advertisements;public class RewardedAdsButton : MonoBehaviour, IUnityAdsLoadListener, IUnityAdsShowListener{ [SerializeField] Button _showAdButton; [SerializeField] string _androidAdUnitId = "Rewarded_Android"; [SerializeField] string _iOSAdUnitId = "Rewarded_iOS"; string _adUnitId = null; // This will remain null for unsupported platforms void Awake() { // Get the Ad Unit ID for the current platform: #if UNITY_IOS _adUnitId = _iOSAdUnitId; #elif UNITY_ANDROID _adUnitId = _androidAdUnitId; #endif // Disable the button until the ad is ready to show: _showAdButton.interactable = false; } // Call this public method when you want to get an ad ready to show. public void LoadAd() { // IMPORTANT! Only load content AFTER initialization (in this example, initialization is handled in a different script). Debug.Log("Loading Ad: " + _adUnitId); Advertisement.Load(_adUnitId, this); } // If the ad successfully loads, add a listener to the button and enable it: public void OnUnityAdsAdLoaded(string adUnitId) { Debug.Log("Ad Loaded: " + adUnitId); if (adUnitId.Equals(_adUnitId)) { // Configure the button to call the ShowAd() method when clicked: _showAdButton.onClick.AddListener(ShowAd); // Enable the button for users to click: _showAdButton.interactable = true; } } // Implement a method to execute when the user clicks the button: public void ShowAd() { // Disable the button: _showAdButton.interactable = false; // Then show the ad: Advertisement.Show(_adUnitId, this); } // Implement the Show Listener's OnUnityAdsShowComplete callback method to determine if the user gets a reward: public void OnUnityAdsShowComplete(string adUnitId, UnityAdsShowCompletionState showCompletionState) { if (adUnitId.Equals(_adUnitId) && showCompletionState.Equals(UnityAdsShowCompletionState.COMPLETED)) { Debug.Log("Unity Ads Rewarded Ad Completed"); // Grant a reward. } } // Implement Load and Show Listener error callbacks: public void OnUnityAdsFailedToLoad(string adUnitId, UnityAdsLoadError error, string message) { Debug.Log($"Error loading Ad Unit {adUnitId}: {error.ToString()} - {message}"); // Use the error details to determine whether to try to load another ad. } public void OnUnityAdsShowFailure(string adUnitId, UnityAdsShowError error, string message) { Debug.Log($"Error showing Ad Unit {adUnitId}: {error.ToString()} - {message}"); // Use the error details to determine whether to try to load another ad. } public void OnUnityAdsShowStart(string adUnitId) { } public void OnUnityAdsShowClick(string adUnitId) { } void OnDestroy() { // Clean up the button listeners: _showAdButton.onClick.RemoveAllListeners(); }}
Next steps: Refer to Implement banner ads in Unity.

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • Rewarded ad buttons

      • Rewarded video ad example


이 페이지의 문제 보고
​
​