k0fe

Untitled

Apr 7th, 2020
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEngine.Advertisements;
  3.  
  4. public class UnityAdsInitialize : MonoBehaviour
  5. {
  6. #if UNITY_ANDROID
  7.     string gameId = "3445968";
  8. #elif UNITY_IOS
  9.     string gameId = "3445969";
  10. #endif
  11.     bool testMode = true;
  12.  
  13.     void Start()
  14.     {
  15.         // Initialize the Ads service:
  16.         Advertisement.Initialize(gameId, testMode);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment