Technical Consultation on Level Streaming in UE5.5.3

Technical Consultation on Level Streaming in UE5.5.3

大家好!我是一个来着中国的虚幻5新手
Hi everyone! :waving_hand: I’m a UE5 beginner from China


问题背景 / Context

我在基于现代虚幻5.5.3的游戏开发中,我在做一款非欧几里得空间效果的游戏,一扇门连接两个物理上不可能相邻的位置,或走廊无限循环,使用UGameplayStatics::LoadStreamLevel来加载流送关卡,但是它依赖编辑器内预先配置的关卡流设置(如位置、旋转等)
Project Context:
Developing non-Euclidean spatial effects (doors connecting physically impossible locations / infinite corridors) in UE5.3. Originally used UGameplayStatics::LoadStreamLevel for level streaming, but it requires preconfigured settings (position/rotation) in-editor.


当前方案 / Current Approach

我现在需要在加载流送关卡的时候设置位置,所以我决定使用ULevelStreamingDynamic::LoadLevelInstance,虽然我通过FStreamableManager异步预加载关卡资源,但是AI告诉我,LoadLevelInstance 的同步实例化本质是 在单帧内完成所有Actor的创建和初始化,这会导致主线程阻塞造成卡顿
Current Implementation:
Switched to ULevelStreamingDynamic::LoadLevelInstance for runtime position configuration, with async preloading via FStreamableManager.
Key Issue: Frame hitches caused by synchronous instantiation (all actors created/initialized in single frame)


核心问题 / Core Questions

:one: 同步初始化的代价 / Synchronous Initialization Cost

AI告诉我LoadStreamLevelBySoftObjectPtr的实例化过程对开发者透明,引擎根据流送策略自动分帧激活Actor(如按LOD优先级、空间分区等),无需手动干预。而ULevelStreamingDynamic::LoadLevelInstance则是所有Actor同步生成,若需分帧异步处理,必须开发者自行实现(如分批次生成、延迟激活等)
那么我作为用户,而不是引擎设计者,肯定做不到像LoadStreamLevelBySoftObjectPtr那样的棒实例化过程,难道说我使用ULevelStreamingDynamic::LoadLevelInstance就只能付出更多努力并做出牺牲吗?

Q1: According to AI analysis:

  • LoadStreamLevelBySoftObjectPtr: Automatic frame-distributed activation (LOD/partition-based)
  • LoadLevelInstance: Requires manual async implementation (batched spawning/delayed activation)
    As an end-user developer, must we accept either manual implementation overhead or frame hitches?

:two: 运行时流送配置 / Runtime Streaming Configuration

我能否通过代码动态的编辑"编辑器内预先配置的关卡流设置(如位置、旋转等)",然后继续使用UGameplayStatics::LoadStreamLevel

Q2: Can we dynamically modify preconfigured level streaming settings (position/rotation) at runtime to keep using UGameplayStatics::LoadStreamLevel?


:three: 替代方案 / Alternative Solutions

我的需求是异步加载一个流送关卡,不会造成卡顿,可以设置其生成位置,如果以上问题都无法解决,那么有没有一种新的最佳实践?

Q3: Core requirements:

  • :white_check_mark: Async loading (no hitches)
  • :white_check_mark: Runtime position configuration
    If neither approach works, what’s the modern best practice?

致谢 / Closing

最后,致敬社区,致敬贡献者
Respect to the community and contributors! :saluting_face: Epic engineers and UE document maintainers especially appreciated.