Exemple #1
0
 protected override void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         base.Awake();
         DontDestroyOnLoad(this.gameObject);
         this.dataManager      = this.GetComponentInChildren <YCDataManager>();
         this.abTestingManager = this.GetComponentInChildren <ABTestingManager>();
         this.adsManager       = this.GetComponentInChildren <AdsManager>();
         this.analyticsManager = this.GetComponentInChildren <AnalyticsManager>();
         this.fbManager        = this.GetComponentInChildren <FBManager>();
         this.gdprManager      = this.GetComponentInChildren <GdprManager>();
         this.i18nManager      = this.GetComponentInChildren <I18nManager>();
         this.inAppManager     = this.GetComponentInChildren <InAppManager>();
         this.mmpManager       = this.GetComponentInChildren <MmpManager>();
         this.rateManager      = this.GetComponentInChildren <RateManager>();
         this.requestManager   = this.GetComponentInChildren <RequestManager>();
         this.settingManager   = this.GetComponentInChildren <SettingManager>(true);
         this.soundManager     = this.GetComponentInChildren <SoundManager>();
         this.vibrationManager = this.GetComponentInChildren <VibrationManager>();
         PlayerPrefs.SetInt(PLAYER_LAUNCH_COUNT, PlayerPrefs.GetInt(PLAYER_LAUNCH_COUNT, 0) + 1);
         Debug.Log("YCManager : Initialize !");
     }
 }
Exemple #2
0
 protected virtual void Awake()
 {
     if (this.IsInit() == false)
     {
         foreach (GameObject g in SceneManager.GetActiveScene().GetRootGameObjects())
         {
             if (YCMANAGER == null)
             {
                 YCMANAGER = g.GetComponentInChildren <YCManager>(true);
             }
             if (this.IsInit())
             {
                 return;
             }
         }
     }
 }