Async Loading vs. Streamable Manager
Both systems are asynchronous—meaning they don't lock the Game Thread (and freeze your screen) while the CPU fetches data from the disk. However, their "scope" is completely different.
1. Async Level Loading (The Macro)
This is typically handled via LoadPackageAsync or the Level Streaming sub-system.
- Best For: New maps, massive DLC chunks, or "World Partition" regions.
- The Workflow: You show a Loading Screen (often a separate, lightweight level or a UI splash), the engine side-loads the
.umapand all its dependencies, and then "unhides" the level once the GPU is ready to draw it.
2. FStreamableManager (The Micro)
This is part of the Asset Manager system. It’s used to load specific assets (Textures, Meshes, Materials) using FSoftObjectPath or TSoftObjectPtr.
- Best For: UI Icons, a specific weapon mesh, or a character skin that isn't always needed in memory.
- The Workflow: You request a specific asset. The
StreamableManagerhandles the disk I/O in the background and fires a Callback (a function or delegate) once the asset is in memory.
Implementation: The "Loading Screen" Strategy
To have a loading screen that hides the "pop-in," you need to coordinate these two systems. In UE5, the standard way to do this in C++ is by using the FStreamableManager.
C++ Example: Loading a Mesh Asynchronously
Instead of hard-coding a pointer (which causes a "hit" or "lag" when the class loads), you use a Soft Pointer.
C++
// Header (.h)
UPROPERTY(EditAnywhere, Category = "Assets")
TSoftObjectPtr<UStaticMesh> MyUltraHighPolyMesh;
// Implementation (.cpp)
void AMyActor::LoadMyMesh()
{
FStreamableManager& Streamable = UAssetManager::GetStreamableManager();
// We start the async load and give it a delegate to call when finished
Streamable.RequestAsyncLoad(MyUltraHighPolyMesh.ToSoftObjectPath(),
FStreamableDelegate::CreateUObject(this, &AMyActor::OnMeshLoaded));
// Logic: This is where you would "ShowLoadingScreen()"
}
void AMyActor::OnMeshLoaded()
{
// Logic: This is where you "HideLoadingScreen()" and Swap the mesh
UStaticMesh* LoadedMesh = MyUltraHighPolyMesh.Get();
MyMeshComponent->SetStaticMesh(LoadedMesh);
}
Summary: When to Use Which?
| Feature | Async Level Loading | Streamable Manager |
|---|---|---|
| Primary Target | .umap (Levels/Worlds) |
.uasset (Meshes/Textures/UI) |
| User Experience | Traditional "Loading Screen" | "Pop-in" or "Loading Spinner" in UI |
| Technical Tool | ULevelStreaming / LoadPackageAsync |
FStreamableManager |
| Memory Impact | High (Clears/Loads massive chunks) | Low (Surgical memory management) |