Exemple #1
0
        //start loading ABs and load logo/loading scene
        private void LoadABs()
        {
            _absManager = gameObject.AddComponent <ABsManager>();
            if (EJRConsts.Instance.InitializingAssetBundle != null)
            {
                _absManager.AddBundleToQueue(EJRConsts.Instance.InitializingAssetBundle.Name);
            }
            List <ABInfo> absInfo = EJRConsts.Instance.AssetBundlesToLoad;

            foreach (ABInfo abInfo in absInfo)
            {
                _absManager.AddBundleToQueue(abInfo.Name);
            }

            SceneManager.LoadScene("ejrLogoScene", LoadSceneMode.Single);
        }
Exemple #2
0
 private void Awake()
 {
     CurrentGamePhase = GamePhase.INIT_STATE;
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);    //This can happen when you start game from mainScene and it will be reloaded after loading bundles. Starter object could be duplicated and the duplicate must be destroyed now.
     }
     else
     {
         Instance = this;
         Platform = GetComponent <PlatformSelector>();
         if (Platform == null)
         {
             throw new System.Exception("Brak obiektu PlatformSelector");
         }
         _configurator  = Platform.CreateSceneConfigurator();
         _mainSceneRoot = null;
         _absManager    = null;
         DontDestroyOnLoad(this.gameObject);
     }
 }