diff --git a/Assets/Scripts/Controller/OperationController.cs b/Assets/Scripts/Controller/OperationController.cs index 156f24ad..a9dfa608 100644 --- a/Assets/Scripts/Controller/OperationController.cs +++ b/Assets/Scripts/Controller/OperationController.cs @@ -155,6 +155,7 @@ public class OperationController : MonoSingleton } } } + TypeEventSystem.Global.Send(); seq.Start(this, () => { curAction = ActionHelper.GetActionAndSub(steps[targetIndex].Start); @@ -174,6 +175,7 @@ public class OperationController : MonoSingleton } TypeEventSystem.Global.Send(new StepStatusOnChange() { curIndex = i, status = StepStatus.NoStart }); } + TypeEventSystem.Global.Send(); seq.Start(this, () => { curAction = ActionHelper.GetActionAndSub(steps[targetIndex].Start); @@ -196,10 +198,12 @@ public class OperationController : MonoSingleton this.index = targetIndex; isStepRun = true; TypeEventSystem.Global.Send(new StepStatusOnChange() { curIndex = targetIndex, status = StepStatus.Start }); + TypeEventSystem.Global.Send(); curAction.Start(this, () => { isStepRun = false; TypeEventSystem.Global.Send(new StepStatusOnChange() { curIndex = targetIndex, status = StepStatus.Finished }); + }); } else diff --git a/Assets/Scripts/UI/UILoading.cs b/Assets/Scripts/UI/UILoading.cs index 6d7ed682..98f63e4f 100644 --- a/Assets/Scripts/UI/UILoading.cs +++ b/Assets/Scripts/UI/UILoading.cs @@ -15,7 +15,13 @@ namespace QFramework.Example { mData = uiData as UILoadingData ?? new UILoadingData(); TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); - TypeEventSystem.Global.Register(arg => Show()).UnRegisterWhenGameObjectDestroyed(gameObject); + TypeEventSystem.Global.Register(arg => + { + if (gameObject.activeSelf == false) + { + Show(); + } + }).UnRegisterWhenGameObjectDestroyed(gameObject); TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); }