void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
            DontDestroyOnLoad(this);
        }
        else
        {
            if (this != _instance)
            {
                Destroy(this.gameObject);
            }
        }


        if (init_once)
        {
            init_once = false;

            initAdmobInterstitial();
            LoadBannerView();
            InitHeyzap();
            LoadInterstitialAd();
            InitUnityadd();
        }
    }
Beispiel #2
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
         return;
     }
     DontDestroyOnLoad(gameObject);
 }