private void Start() { _container = new Container(); _configStorage = new ConfigStorage(); _unityEventManager = new UnityEventManager(); _container.Register <IUnityEventManager>(_unityEventManager); _container.Register <IPrefabLoader>(new PrefabLoader()); _container.Register <IConfigStorage>(_configStorage); _container.Register <IPrefabsPoolingService>(new PrefabsPoolingService()); _container.Inject(); _container.PrepareAll(); _container.StartAll(); LoadScene(_configStorage.Get <GameConfig>(0).MainScene, null); }
public void LoadScene <T>(string sceneLinkage) where T : class, ISceneInitable { var gameConfig = _configStorage.Get <GameConfig>(0); _unityEventManager.StartCoroutine(SceneLoaderCoroutine(gameConfig.PreloaderScene, sceneLinkage)); }
public void LoadScene(string sceneLinkage, Action callback) { var gameConfig = _configStorage.Get <GameConfig>(0); _unityEventManager.StartCoroutine(SceneLoaderCoroutine(gameConfig.PreloaderScene, sceneLinkage, callback)); }