I’ve been using Unreal Engine for quite a while now, and I often encounter questions related to the same topics, even small ones. In my first post about UE4 I want to answer a very simple question: how can I get the Streaming Level name of an actor?
In Blueprint we have the “Get Current Level Name”, but that returns the Persistent Level Name, not the Streaming level name:
We are going to expose a new Blueprint function, and to do so we are going to create our custom Blueprint Library in C++.
If you are coming from a Blueprint-only project, you will first need to convert it to a C++ project. To do so, you will first need to install Visual Studio, just follow the official instructions here. Then, you can go ahead and create a C++ file from the ADD NEW menu:
class YOURPROJECTNAME_API UMyFunctionLibrary : public UBlueprintFunctionLibrary
// Get Sub Level name
UFUNCTION(BlueprintPure, Category = NYTaskHelper)
static FName GetActorStreamingLevelName(AActor* Actor);
FName UMyFunctionLibrary::GetActorStreamingLevelName(AActor* Actor)
if (Actor != nullptr)
Save and compile. This will expose a new node in your Blueprints. Just input the actor you’re looking to find the Streaming Level name for:
Hope this helps.
Credits to Elathan for first exposing the solution.