// -------------------------------------------------------------------------------------------- private void OnEnable() { _backgroundView = new StartMenuBackgroundView(); _uiStartMenuRootView = new UIStartMenuRootView(this); _stateMachine.ChangeState(State.Loading); }
// -------------------------------------------------------------------------------------------- private void Loading_Enter() { _backgroundView = new StartMenuBackgroundView(); new AsyncAssetViewLoader(new[] { _backgroundView, }).LoadAll((float progress) => { if (progress.IsApproximately(1f)) { _stateMachine.ChangeState(State.Root); } }); }