Version: 5.6
Unity Ads
Best practices on rewarded ads

Как использовать Unity Ads

Once you have set up your project for Unity Services, you can enable the Unity Ads service.

Step 1: Enable ads for your game in the Editor

  1. Open the Ads configuration window from Window > Services > Ads
    Open Drawer
  2. Click the switch on the right-hand side to turn Ads on, then answer a few questions about the game you are making.
    Enable Ads

Ads are now enabled for your game.

Step 2: Add code to your game

You can use code samples to implement ads in your game. Go to the Code samples tab and copy the relevant script snippets to your C# code (for example, during the loading scene or at the end of your game).

Add Code
Add Code

There are code samples for:

  • Simple: Easy to use for simple fullscreen interstitial ads (for example, to appear between game levels)
  • Rewarded: Show an ad with a result callback. You can use this to give your players in-game rewards (such as coins, gems, points or extra lives) for watching an ad.

If you have previously used Unity Ads using the Asset Store package: what has changed?

  • You do not need to register to Unity Ads’ self-serve admin; instead, an account is created for you (if you don’t already have one) when you first enable ads in the editor.
  • You do not need to create game profiles in self-server admin; game profiles and IDs will be created automatically when you enable ads in your project.
  • You don’t need to initialise the ads system in your code, initialisation happens in the background.
  • API changes: function names have been changed to be in line with normal C# naming conventions. (for example, isReady has been changed to IsReady). Also, the pause option has been removed as it was only used for picture ads.
  • Support for picture ads has been removed
Unity Ads
Best practices on rewarded ads
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961