GeWuYou 760cc71985 feat(ui): 实现UI实例池化管理和生命周期优化
- 添加UI实例管理策略枚举(AlwaysCreate、Reuse、Pooled)
- 在GodotUiFactory中实现缓存池和实例回收机制
- 扩展IUiFactory接口支持预加载、回收和缓存管理功能
- 更新UiRouterBase支持实例策略参数传递
- 重构Pop策略将Hide重命名为Cache以明确语义
- 移除项目文件中的冗余文件夹引用
- 添加日志记录便于调试和监控实例状态
- 实现批量预加载和全量缓存清理功能
- 优化页面替换逻辑支持实例复用和池化管理
2026-01-20 08:32:53 +08:00

23 lines
454 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace GFramework.Game.Abstractions.ui;
/// <summary>
/// UI页面实例管理策略控制实例的生命周期
/// </summary>
public enum UiInstancePolicy
{
/// <summary>
/// 总是创建新实例
/// </summary>
AlwaysCreate,
/// <summary>
/// 复用已存在的实例(如果有)
/// </summary>
Reuse,
/// <summary>
/// 从预加载池中获取或创建
/// </summary>
Pooled
}