提交
This commit is contained in:
@@ -155,6 +155,12 @@ namespace AibisDream
|
||||
{
|
||||
UIManager.Instance.GetPanel<PlayToolPanel>().FadeInSync(0.1f);
|
||||
|
||||
// 清理所有系统注册
|
||||
if (FixSystemCenter.SystemDic != null)
|
||||
{
|
||||
FixSystemCenter.SystemDic.Clear();
|
||||
}
|
||||
|
||||
// 执行场景切换等功能
|
||||
CameraKit.Instance.ResetCamera();
|
||||
yield return SceneLoader.Instance.LoadSceneAsync("ClinicOut");
|
||||
|
||||
@@ -2,9 +2,11 @@ using System;
|
||||
using System.Collections;
|
||||
using AibisDream.Framework;
|
||||
using AibisDream.Kit;
|
||||
using AibisDream.FixSystem;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.SceneManagement;
|
||||
using DG.Tweening;
|
||||
|
||||
namespace AibisDream
|
||||
{
|
||||
@@ -50,8 +52,19 @@ namespace AibisDream
|
||||
// 场景转换参数
|
||||
_isLoading = true;
|
||||
_sceneToLoad = targetScene;
|
||||
|
||||
// 在卸载场景前清理所有系统
|
||||
if (!string.IsNullOrEmpty(_data.sceneName))
|
||||
{
|
||||
// 清理所有DOTween动画
|
||||
DOTween.KillAll();
|
||||
|
||||
// 清理所有系统注册
|
||||
if (FixSystemCenter.SystemDic != null)
|
||||
{
|
||||
FixSystemCenter.SystemDic.Clear();
|
||||
}
|
||||
|
||||
yield return Addressables.UnloadSceneAsync(_loadHandle);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user