コード例 #1
0
 /// <summary>
 /// Init this instance.
 /// </summary>
 private void Init()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
         if (admob == null)
         {
             admob = GetComponent <AdMob> ();
         }
         if (chartBoostAd == null)
         {
             chartBoostAd = GetComponent <ChartboostAd> ();
         }
         if (unityAd == null)
         {
             unityAd = GetComponent <UnityAd> ();
         }
     }
     else
     {
         Destroy(gameObject);
     }
 }