protected override void Init() { var flow = this.flow; #if UNITY_MOBILE if (this.flowMobileOnly != null) { flow = this.flowMobileOnly; } #endif #if UNITY_STANDALONE if (this.flowStandaloneOnly != null) { flow = this.flowStandaloneOnly; } #endif FlowSystem.SetData(flow); this.defaults.AddRange(flow.GetDefaultScreens()); this.windows.AddRange(flow.GetAllScreens()); base.Init(); this.OnStart(); }
protected override void Init() { #region FLOW DEFAULT { var flow = this.flow; if (flow == null) { Debug.LogError("Flow data was not set to WindowSystemFlow."); return; } #if UNITY_MOBILE if (this.flowMobileOnly != null) { flow = this.flowMobileOnly; } #endif #if UNITY_STANDALONE if (this.flowStandaloneOnly != null) { flow = this.flowStandaloneOnly; } #endif #if UNITY_CONSOLE if (this.flowConsoleOnly != null) { flow = this.flowConsoleOnly; } #endif FlowSystem.SetData(flow); Audio.Manager.InitAndAdd(flow.audio); this.defaults.AddRange(flow.GetDefaultScreens()); this.windows.AddRange(flow.GetAllScreens()); this.rootScreen = this.flow.GetRootScreen(); } #endregion #region FLOW ADDITIONAL { var additionalFlow = this.additionalFlow; #if UNITY_MOBILE if (this.additionalFlowMobileOnly != null) { flow = this.additionalFlowMobileOnly; } #endif #if UNITY_STANDALONE if (this.additionalFlowStandaloneOnly != null) { flow = this.additionalFlowStandaloneOnly; } #endif #if UNITY_CONSOLE if (this.additionalFlowConsoleOnly != null) { flow = this.additionalFlowConsoleOnly; } #endif if (additionalFlow != null) { var screens = additionalFlow.GetAllScreens((w) => ((this.additionalLoadType & LoadType.Function) != 0 && (w.IsFunction() == true || w.GetFunctionContainer() != null)) || ((this.additionalLoadType & LoadType.Window) != 0 && w.IsFunction() == false)); this.windows.AddRange(screens); if ((this.additionalLoadType & LoadType.Audio) != 0) { Audio.Manager.InitAndAdd(flow.audio); } } } #endregion base.Init(); }