Skip to content

Commit

Permalink
Merge pull request #75 from SunXuebing/main
Browse files Browse the repository at this point in the history
调整编辑器模式下模块销毁顺序,解决编辑器退出运行后资源管理器销毁了还被调用问题
  • Loading branch information
ALEXTANGXIAO authored May 20, 2024
2 parents db6e715 + cd9a10c commit b00679a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions UnityProject/Assets/TEngine/Runtime/Modules/GameModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ void HandlePlayModeStateChanged(PlayModeStateChange state)
{
if (state == PlayModeStateChange.ExitingPlayMode)
{
ModuleImpSystem.Shutdown();
ModuleSystem.Shutdown(ShutdownType.Quit);
}
}
Expand Down
2 changes: 2 additions & 0 deletions UnityProject/Assets/TEngine/Runtime/Modules/RootModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ private void OnApplicationQuit()

private void OnDestroy()
{
#if !UNITY_EDITOR
ModuleImpSystem.Shutdown();
#endif
}

/// <summary>
Expand Down

0 comments on commit b00679a

Please sign in to comment.