diff --git a/GFramework.Game.Abstractions/scene/ISceneRouter.cs b/GFramework.Game.Abstractions/scene/ISceneRouter.cs index d7708a5..c71f6ba 100644 --- a/GFramework.Game.Abstractions/scene/ISceneRouter.cs +++ b/GFramework.Game.Abstractions/scene/ISceneRouter.cs @@ -38,7 +38,7 @@ public interface ISceneRouter : ISystem /// 获取场景行为对象的只读列表,表示当前的场景栈结构。 /// 列表中第一个元素为栈底场景,最后一个元素为当前活动场景。 /// - IReadOnlyList Stack { get; } + IEnumerable Stack { get; } /// /// 获取场景路由器是否正在进行场景切换操作。 diff --git a/GFramework.Game/scene/SceneRouterBase.cs b/GFramework.Game/scene/SceneRouterBase.cs index 62de16f..1425f4d 100644 --- a/GFramework.Game/scene/SceneRouterBase.cs +++ b/GFramework.Game/scene/SceneRouterBase.cs @@ -53,10 +53,9 @@ public abstract class SceneRouterBase public string? CurrentKey => Current?.Key; /// - /// 获取场景栈的只读列表,按压入顺序排列。 + /// 获取场景栈的只读视图,按压入顺序排列(从栈底到栈顶)。 /// - public IReadOnlyList Stack => - _stack.Reverse().ToList(); + public IEnumerable Stack => _stack.Reverse(); /// /// 获取是否正在进行场景转换。