diff --git a/Assets/YooAsset/Runtime/ResourceManager/Provider/BundledSceneProvider.cs b/Assets/YooAsset/Runtime/ResourceManager/Provider/BundledSceneProvider.cs index 96d5157..b6710f8 100644 --- a/Assets/YooAsset/Runtime/ResourceManager/Provider/BundledSceneProvider.cs +++ b/Assets/YooAsset/Runtime/ResourceManager/Provider/BundledSceneProvider.cs @@ -64,6 +64,7 @@ namespace YooAsset { LoadSceneParameters parameters = new LoadSceneParameters(SceneMode); SceneObject = SceneManager.LoadScene(MainAssetInfo.AssetPath, parameters); + _steps = ESteps.Checking; } else { diff --git a/Assets/YooAsset/Runtime/ResourceManager/Provider/DatabaseSceneProvider.cs b/Assets/YooAsset/Runtime/ResourceManager/Provider/DatabaseSceneProvider.cs index f12975a..d7c5e4a 100644 --- a/Assets/YooAsset/Runtime/ResourceManager/Provider/DatabaseSceneProvider.cs +++ b/Assets/YooAsset/Runtime/ResourceManager/Provider/DatabaseSceneProvider.cs @@ -61,6 +61,7 @@ namespace YooAsset { LoadSceneParameters loadSceneParameters = new LoadSceneParameters(SceneMode); SceneObject = UnityEditor.SceneManagement.EditorSceneManager.LoadSceneInPlayMode(MainAssetInfo.AssetPath, loadSceneParameters); + _steps = ESteps.Checking; } else { diff --git a/Assets/YooAsset/Runtime/YooAssetsExtension.cs b/Assets/YooAsset/Runtime/YooAssetsExtension.cs index 927aa82..edaf7cf 100644 --- a/Assets/YooAsset/Runtime/YooAssetsExtension.cs +++ b/Assets/YooAsset/Runtime/YooAssetsExtension.cs @@ -156,6 +156,28 @@ namespace YooAsset #endregion #region 场景加载 + /// + /// 同步加载场景 + /// + /// 场景的定位地址 + /// 场景加载模式 + public static SceneHandle LoadSceneSync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single) + { + DebugCheckDefaultPackageValid(); + return _defaultPackage.LoadSceneSync(location, sceneMode); + } + + /// + /// 同步加载场景 + /// + /// 场景的资源信息 + /// 场景加载模式 + public static SceneHandle LoadSceneSync(AssetInfo assetInfo, LoadSceneMode sceneMode = LoadSceneMode.Single) + { + DebugCheckDefaultPackageValid(); + return _defaultPackage.LoadSceneSync(assetInfo, sceneMode); + } + /// /// 异步加载场景 ///