# How do i get the name of the streaming level that actor is present in.

**URL:** <https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410>\
**Category:** Community & Industry Discussion\
**Tags:** load, streaming-level, unreal-engine, question\
**Created:** [February 19, 2017, 9:05am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410 "2017-02-19T09:05:03Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toody\_HD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Toody\_HD](https://forums.unrealengine.com/u/Toody_HD)\
**Post date:** [February 19, 2017, 9:05am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/1 "2017-02-19T09:05:03Z")

</div>

Hello, I would like to make a save/load level loading system and I need to get the level name that the actor is in at that moment. I’ve tried using “Get Current Level Name” function, but it returns the main persistent level name, not the sub-level that the actor is at that moment.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1a8be4c0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1a8be4c0](https://forums.unrealengine.com/u/anonymous_user_1a8be4c0)\
**Post date:** [May 21, 2017, 8:13pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/2 "2017-05-21T20:13:31Z")

</div>

Have you found a solution yet?

---

<div class="post-metadata">

**Author:** ![Toody\_HD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Toody\_HD](https://forums.unrealengine.com/u/Toody_HD)\
**Post date:** [May 21, 2017, 8:18pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/3 "2017-05-21T20:18:39Z")

</div>

What I’ve done is to make a save function for each level that i have and put them in each level.

---

<div class="post-metadata">

**Author:** ![Elathan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elathan](https://forums.unrealengine.com/u/Elathan)\
**Post date:** [May 28, 2017, 10:56am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/4 "2017-05-28T10:56:15Z")

</div>

Here you go:

```
  Actor->GetLevel()->GetOuter()->GetName();

```

For some reason all the ULevel-s are called PersistentLevel. Sounds like a bug to me, but who knows. Their outers have the name we are looking for tho.

I spent more time on the internet trying to find an answer to this question than I did in visual studio to find the solution of my own.

 ![139506-l3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/9/2/e929101239798b8296b04956f8e7b30db878aca6.png)

---

<div class="post-metadata">

**Author:** ![ryanbai](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ryanbai](https://forums.unrealengine.com/u/ryanbai)\
**Post date:** [June 26, 2018, 2:18am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/5 "2018-06-26T02:18:20Z")

</div>

Thank you！Perfect!

---

<div class="post-metadata">

**Author:** ![Teapot\_Creation](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teapot\_Creation](https://forums.unrealengine.com/u/Teapot_Creation)\
**Post date:** [October 16, 2018, 2:12pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/6 "2018-10-16T14:12:44Z")

</div>

Hey ! Was just wondering : any idea how to achieve this in Blueprints ?

---

<div class="post-metadata">

**Author:** ![Elathan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elathan](https://forums.unrealengine.com/u/Elathan)\
**Post date:** [October 16, 2018, 2:25pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/7 "2018-10-16T14:25:17Z")

</div>

Afaik you can’t. Writing a static c++ function and calling that from BP is the way to go.

---

<div class="post-metadata">

**Author:** ![MadRat1171](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MadRat1171](https://forums.unrealengine.com/u/MadRat1171)\
**Post date:** [November 8, 2018, 9:51pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/8 "2018-11-08T21:51:11Z")

</div>

That’s what I’m looking for. Too bad that I’m a total c++ noob. Can someone write full function in c++? I’m struggling an hour to get this working and I have no idea what am I doing. Anyone can help?

---

<div class="post-metadata">

**Author:** ![Elathan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Elathan](https://forums.unrealengine.com/u/Elathan)\
**Post date:** [November 9, 2018, 8:32am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/9 "2018-11-09T08:32:47Z")

</div>

// Fill out your copyright notice in the Description page of Project Settings.

```
#pragma once

#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "GameFramework/Actor.h"
#include "MyBlueprintFunctionLibrary.generated.h"

/**
 * 
 */
UCLASS()
class PROJECTNAME_API UMyBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()
	
	UFUNCTION(BlueprintPure, Category = NYTaskHelper)
	static FName GetStreamingLevelNameFromActor(AActor* Actor)
	{
		if (Actor != nullptr)
		{
			return Actor->GetLevel()->GetOuter()->GetFName();
		}

		return NAME_None;
	}
};
```

---

<div class="post-metadata">

**Author:** ![MadRat1171](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MadRat1171](https://forums.unrealengine.com/u/MadRat1171)\
**Post date:** [November 9, 2018, 8:51pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/10 "2018-11-09T20:51:08Z")

</div>

Thank you for that ! Works as it should.

---

<div class="post-metadata">

**Author:** ![Ricov123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ricov123](https://forums.unrealengine.com/u/Ricov123)\
**Post date:** [July 6, 2020, 7:48am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/11 "2020-07-06T07:48:39Z")

</div>

Hi Elathan - I’m the furthest thing from a programmer - I’ve been trying your code in a character class (but I’m worse at c++ than MadRat). I have it in the .h file but don’t see any change in the BP. Been struggling for a solid week to get the level stream name for the save object. Besides jumping off a high building have you got any advice?

Has (ULevel-s are called PersistentLevel) been sorted - because I’ve tried every variation of getWorldPackadgeFname \>getstreaminglevel \>Set Level Streaming name with no success - maybe the solution is simple I’m just not finding it. You are the last hope . . .

---

<div class="post-metadata">

**Author:** ![Tefel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tefel/32/1194573_2.png) [@Tefel](https://forums.unrealengine.com/u/Tefel)\
**Post date:** [June 16, 2021, 9:34am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/12 "2021-06-16T09:34:38Z")

</div>

Nice finding!

---

<div class="post-metadata">

**Author:** ![FamousMaxy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FamousMaxy](https://forums.unrealengine.com/u/FamousMaxy)\
**Post date:** [March 7, 2022, 10:40pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/13 "2022-03-07T22:40:21Z")

</div>

You can achieve that by blueprints by writing the following : self \> getOuterObject \> getOuterObject \> getObjectName, hope this helps someone.

---

<div class="post-metadata">

**Author:** ![MaxHayon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaxHayon](https://forums.unrealengine.com/u/MaxHayon)\
**Post date:** [July 6, 2022, 1:56pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/14 "2022-07-06T13:56:32Z")

</div>

That worked! Thanks!!

---

<div class="post-metadata">

**Author:** ![UrWaifu420](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/urwaifu420/32/88711_2.png) [@UrWaifu420](https://forums.unrealengine.com/u/UrWaifu420)\
**Post date:** [August 1, 2022, 4:58am UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/15 "2022-08-01T04:58:01Z")

</div>

I had a similar issue but I need to find all actors of a type in a streaming level once loaded. Here was my solution for a C++ function to be accessed via Blueprints.

```auto
void UBlueprintFunctionLibrary::GetAllActorsOfClassFromStreamingLevel(UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, ULevelStreaming* StreamingLevel, TArray<AActor*>& OutActors)
{
	OutActors.Reset();

	if (ActorClass && StreamingLevel)
	{
		ULevel* Level = StreamingLevel->GetLoadedLevel();
		OutActors.Reserve(Level->Actors.Num());
		for (const auto LevelActor : Level->Actors)
		{
			if (IsValid(LevelActor) && LevelActor->IsA(ActorClass))
			{
				OutActors.Add(LevelActor);
			}

		}
	}
}

```

---

<div class="post-metadata">

**Author:** ![Nizami\_Nz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nizami\_Nz](https://forums.unrealengine.com/u/Nizami_Nz)\
**Post date:** [July 2, 2023, 6:11pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/16 "2023-07-02T18:11:19Z")

</div>

Create function into Blueprint, it will be return map name.

 ![Снимок](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/5/af53f906e4d42669a8637ac303ff2f2ae593bdbc.png)  
 ![0Снимок](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/4/cd48697a82a1a0df72bdaa12ca3e87745525e0f0.png)

---

<div class="post-metadata">

**Author:** ![charles\_interface](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/charles_interface/32/725634_2.png) [@charles\_interface](https://forums.unrealengine.com/u/charles_interface)\
**Post date:** [November 28, 2024, 9:14pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/17 "2024-11-28T21:14:09Z")

</div>

it’s working for me

---

<div class="post-metadata">

**Author:** ![DiliupG](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/diliupg/32/1071099_2.png) [@DiliupG](https://forums.unrealengine.com/u/DiliupG)\
**Post date:** [April 25, 2025, 6:21pm UTC](https://forums.unrealengine.com/t/how-do-i-get-the-name-of-the-streaming-level-that-actor-is-present-in/385410/18 "2025-04-25T18:21:46Z")

</div>

brilliant! Hidden gems!
