feat: Implement Room Streaming System

- Add RoomStreamingManager to manage room loading and unloading based on player proximity.
- Create StreamingBudgetConfigSO for memory and performance budgeting of the streaming system.
- Introduce TransitionDirector to handle seamless and atmospheric fade transitions between rooms.
- Develop WorldGraph to represent room connectivity and facilitate neighbor queries and distance calculations.
- Implement RoomNode and RoomEdge classes to structure room data and connections.
This commit is contained in:
2026-05-23 19:10:29 +08:00
parent 81c326af53
commit a1b4e629aa
165 changed files with 7904 additions and 313 deletions

View File

@@ -0,0 +1,29 @@
namespace BaseGames.World
{
/// <summary>
/// 房间在流式加载系统中的生命周期状态。
/// </summary>
public enum RoomState
{
/// <summary>未加载,资产不在内存中。</summary>
Unloaded,
/// <summary>正在后台异步加载中。</summary>
Loading,
/// <summary>已加载并初始化处于休眠状态渲染器、AI、物理均已关闭不消耗 CPU。</summary>
Dormant,
/// <summary>正在激活中(分帧启用 AI。</summary>
Activating,
/// <summary>完全激活,玩家当前所在的房间。</summary>
Active,
/// <summary>玩家已离开,等待冷却计时后转为 Dormant 或 Unloaded。</summary>
Cooling,
/// <summary>正在后台异步卸载中。</summary>
Unloading,
}
}