From bfcc1b5fd6323d0e4bf066265a3a2ea81ea86d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=80=9D=E6=B5=B7?= <1464576565@qq.com> Date: Tue, 7 Apr 2026 16:54:59 +0800 Subject: [PATCH] fix --- Runtime/Scene/SceneService.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Runtime/Scene/SceneService.cs b/Runtime/Scene/SceneService.cs index 647b1ea..1b6a4bc 100644 --- a/Runtime/Scene/SceneService.cs +++ b/Runtime/Scene/SceneService.cs @@ -32,7 +32,7 @@ namespace AlicizaX.Scene.Runtime if (sceneMode == LoadSceneMode.Additive) { - if (sceneState.TryGetSubScene(location, out SceneHandle loadedSubScene)) + if (sceneState.TryGetSubScene(location, out YooAsset.SceneHandle loadedSubScene)) { throw new Exception($"Could not load subScene while already loaded. Scene: {location}"); } @@ -97,7 +97,7 @@ namespace AlicizaX.Scene.Runtime if (sceneMode == LoadSceneMode.Additive) { - if (sceneState.TryGetSubScene(location, out SceneHandle loadedSubScene)) + if (sceneState.TryGetSubScene(location, out YooAsset.SceneHandle loadedSubScene)) { Log.Warning($"Could not load subScene while already loaded. Scene: {location}"); return; @@ -306,7 +306,7 @@ namespace AlicizaX.Scene.Runtime return sceneState; } - private async UniTaskVoid InvokeSceneProgress(SceneHandle sceneHandle, Action progress) + private async UniTaskVoid InvokeSceneProgress(YooAsset.SceneHandle sceneHandle, Action progress) { if (sceneHandle == null) { @@ -337,12 +337,12 @@ namespace AlicizaX.Scene.Runtime internal sealed class SceneDomainStateService : ServiceBase, ISceneStateService { - private readonly Dictionary _subScenes = new Dictionary(); + private readonly Dictionary _subScenes = new (); private readonly HashSet _handlingScenes = new HashSet(); public string CurrentMainSceneName { get; private set; } = string.Empty; - public SceneHandle CurrentMainSceneHandle { get; private set; } + public YooAsset.SceneHandle CurrentMainSceneHandle { get; private set; } protected override void OnInitialize() { @@ -377,7 +377,7 @@ namespace AlicizaX.Scene.Runtime TryBeginHandling(sceneName); } - public void SetMainScene(string sceneName, SceneHandle sceneHandle) + public void SetMainScene(string sceneName, YooAsset.SceneHandle sceneHandle) { CurrentMainSceneName = sceneName ?? string.Empty; CurrentMainSceneHandle = sceneHandle; @@ -394,12 +394,12 @@ namespace AlicizaX.Scene.Runtime } } - public void AddSubScene(string location, SceneHandle sceneHandle) + public void AddSubScene(string location, YooAsset.SceneHandle sceneHandle) { _subScenes[location] = sceneHandle; } - public bool TryGetSubScene(string location, out SceneHandle sceneHandle) + public bool TryGetSubScene(string location, out YooAsset.SceneHandle sceneHandle) => _subScenes.TryGetValue(location, out sceneHandle); public bool RemoveSubScene(string location)