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,24 @@
namespace BaseGames.World
{
/// <summary>
/// 玩家在房间激活时的出生上下文。
/// 由 <see cref="Streaming.RoomHandle"/> 传递给 <see cref="RoomController"/>
/// 用于确定出生点位置和方向。
/// </summary>
public readonly struct SpawnContext
{
/// <summary>目标出生点 ID对应 <see cref="PlayerSpawnPoint.TransitionId"/>。null 时使用默认出生点。</summary>
public readonly string EntryTransitionId;
/// <summary>true = 死亡复活流程,不播放入场动画。</summary>
public readonly bool IsRespawn;
public SpawnContext(string entryTransitionId, bool isRespawn = false)
{
EntryTransitionId = entryTransitionId;
IsRespawn = isRespawn;
}
public static readonly SpawnContext Default = new SpawnContext(null, false);
}
}