private bool mIsRunStart = false; //是否调用过一次StateStart public void SetState(ISceneState state, bool isLoadScene = true) { if (mState != null) { mState.StateEnd(); } mState = state; if (isLoadScene) { mAO = SceneManager.LoadSceneAsync(mState.SceneName); mIsRunStart = false; } else { mState.StateAwake(); mState.StateStart(); mIsRunStart = true; } }