yenmoc

AdmobController

Feb 27th, 2021
998
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2.  
  3. #if UNITY_IOS
  4. using Unity.Advertisement.IosSupport;
  5. #endif
  6.  
  7. public class AdmobController : MonoBehaviour
  8. {
  9.     private void Start()
  10.     {
  11. #if UNITY_IOS
  12.         if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus() == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
  13.         {
  14.             ATTrackingStatusBinding.RequestAuthorizationTracking();
  15.         }
  16. #endif
  17.        
  18.         // Other Init
  19.     }
  20.    
  21. }
  22.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×