# reference to level currently loaded

**URL:** <https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [January 4, 2025, 4:54am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812 "2025-01-04T04:54:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 4:54am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/1 "2025-01-04T04:54:44Z")

</div>

hi

is there a way to get a reference to the level currently loaded in a blueprint

thanks

---

<div class="post-metadata">

**Author:** ![jay001020](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jay001020/32/1194524_2.png) [@jay001020](https://forums.unrealengine.com/u/jay001020)\
**Post date:** [January 4, 2025, 6:41am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/2 "2025-01-04T06:41:23Z")

</div>

You can use a get all actor of class node and the class is Level Script Actor.

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 7:29am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/3 "2025-01-04T07:29:30Z")

</div>

how do you manipulate that  
i am struggling to save the result (of all actors of class levelscriptactor) to a local variable or variable to use

---

<div class="post-metadata">

**Author:** ![jay001020](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jay001020/32/1194524_2.png) [@jay001020](https://forums.unrealengine.com/u/jay001020)\
**Post date:** [January 4, 2025, 7:49am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/4 "2025-01-04T07:49:11Z")

</div>

Sorry Get Actor of Class is the node not Get All~. Should be able to save the return as an actor variable.

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 7:53am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/5 "2025-01-04T07:53:01Z")

</div>

same thing  
the one only wants you to dereference the array  
both ways do not allow you to store as variable

---

<div class="post-metadata">

**Author:** ![jay001020](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jay001020/32/1194524_2.png) [@jay001020](https://forums.unrealengine.com/u/jay001020)\
**Post date:** [January 4, 2025, 7:59am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/6 "2025-01-04T07:59:30Z")

</div>

![ss1212](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/1/bd16561995a61d9119d4ebeb0a9f4c2f2f028d5d.jpeg)

This is what it looks like for me. Don’t try to use “promote to variable”, create an actor variable and use that.

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 8:13am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/7 "2025-01-04T08:13:30Z")

</div>

what variable type did you use to create the variable to save / store to  
i cant create a variable type levelscriptactor

actor object seems to work

---

<div class="post-metadata">

**Author:** ![jay001020](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jay001020/32/1194524_2.png) [@jay001020](https://forums.unrealengine.com/u/jay001020)\
**Post date:** [January 4, 2025, 8:18am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/8 "2025-01-04T08:18:35Z")

</div>

> [@barbrian0723](#):
>
> i cant create a variable type levelscriptactor

There isn’t a levelscriptactor type that’s why you can’t use promote to variable. Actor object is fine.

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [January 4, 2025, 8:24am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/9 "2025-01-04T08:24:09Z")

</div>

there is a “get current level” think it’s off the game mode node

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 8:27am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/10 "2025-01-04T08:27:30Z")

</div>

how can i manipulate the levelscriptactor now saved as a normal actor object?  
i tried to cast it to a certain level to determine its type but i see cast to a level is not possible

i see there is a get level node with level object reference as output  
but not sure what i can do with that  
i dont see any nodes really that accept level object references

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 8:28am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/11 "2025-01-04T08:28:36Z")

</div>

yes get level  
but how do you use it  
i gives a level object reference  
but not sure what to do with that

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [January 4, 2025, 8:30am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/12 "2025-01-04T08:30:41Z")

</div>

What to do with it is up to you, I use it for my saved game functionality, so the game will load the level the player was in last, it’s saved there as a variable, and I have a load level function for loading from a saved game that calls “open level from object reference”

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 8:33am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/13 "2025-01-04T08:33:13Z")

</div>

ok  
you mean you plug it into a load level node?

i am trying to test if a certain level is loaded so that i can load it if not loaded  
how will i do such a object or name test on a level object reference  
do you know?

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [January 4, 2025, 8:36am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/14 "2025-01-04T08:36:55Z")

</div>

Load level just loads it into memory I believe, open level actually puts the player into it. I think what you’d want to do is pull of the level object reference pin and type ==

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 8:47am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/15 "2025-01-04T08:47:01Z")

</div>

sorry i was referring to open level not load level

when i am testing whether the get level result is equal to the level of interest, i can no longer save the blueprint  
it gives the error that the blueprint is now part of that level

 ![Screenshot (242)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/4/6/84668bcfd2bbe7ef5b342cbf9d6c7cb5d8a8861e.png)  
 ![Screenshot (243)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/1/e71df06ef36b1244f008ceb31bb532f0bc276873.png)

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 8:49am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/16 "2025-01-04T08:49:02Z")

</div>

maybe i should simply use and stick to streaming levels to avoid this mess

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [January 4, 2025, 8:53am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/17 "2025-01-04T08:53:54Z")

</div>

Streaming levels is definitely the way to go. This may help though…

 ![Screenshot 2025-01-04 005301](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/a/6eac3f14d4ea6b7963497dbed435515fe4d116cd.png)

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 9:10am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/18 "2025-01-04T09:10:22Z")

</div>

thanks

how do you get “get loaded level” where the target is level instance interface  
the only get loaded level i see is with target streaming level

---

<div class="post-metadata">

**Author:** ![barbrian0723](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@barbrian0723](https://forums.unrealengine.com/u/barbrian0723)\
**Post date:** [January 4, 2025, 9:21am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/19 "2025-01-04T09:21:05Z")

</div>

this works for me

 ![Screenshot (245)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/0/dd09c302250661aed90707aad4352497a245d945.png)

more or less the same except i manage to get by with a string name

---

<div class="post-metadata">

**Author:** ![doctorpepperdan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@doctorpepperdan](https://forums.unrealengine.com/u/doctorpepperdan)\
**Post date:** [January 4, 2025, 9:38am UTC](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812/20 "2025-01-04T09:38:18Z")

</div>

“get game mode”

[Next page](https://forums.unrealengine.com/t/reference-to-level-currently-loaded/2258812.md?page=2)
