# Simple question how to cast to another BP from a level BP

**URL:** <https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324>\
**Category:** Blueprint\
**Tags:** inheritance, object-reference, unreal-engine, multiple-instance, Blueprint, question\
**Created:** [March 15, 2021, 10:53am UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324 "2021-03-15T10:53:19Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![unrealredist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unrealredist](https://forums.unrealengine.com/u/unrealredist)\
**Post date:** [March 15, 2021, 10:53am UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/1 "2021-03-15T10:53:19Z")

</div>

Any idea on how to cast from a level Blueprint to a normal Blueprint?

It can't be a \*\*'cast to class'\*\* because I want to access some variables,

And it can't be that individual Instance because I will be having multiple instances of that Blueprint,

All what's needed is to access and change the Class Default so that the instances will inherit that Data

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 15, 2021, 11:22am UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/2 "2021-03-15T11:22:36Z")

</div>

> cast to another BP

What is that blueprint?

- placed in the level manually
- or spawned from class dynamically

---

<div class="post-metadata">

**Author:** ![unrealredist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unrealredist](https://forums.unrealengine.com/u/unrealredist)\
**Post date:** [March 15, 2021, 11:24am UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/3 "2021-03-15T11:24:05Z")

</div>

Spawned from class dynamically

---

<div class="post-metadata">

**Author:** ![unrealredist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unrealredist](https://forums.unrealengine.com/u/unrealredist)\
**Post date:** [March 15, 2021, 11:28am UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/4 "2021-03-15T11:28:10Z")

</div>

its spawned by the level Blueprint

---

<div class="post-metadata">

**Author:** ![unrealredist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unrealredist](https://forums.unrealengine.com/u/unrealredist)\
**Post date:** [March 15, 2021, 11:42am UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/5 "2021-03-15T11:42:59Z")

</div>

its spawned at a Specific world location and moves from that axis

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 15, 2021, 11:48am UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/6 "2021-03-15T11:48:24Z")

</div>

If it’s spawned dynamically by the LB, you already have the reference (return value) and there’s nothing to cast… It’s an actor with the correct type already.

![332504-screenshot-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/c/aec2d26d2635b2cd40b9688668e5e88b8ecce42b.jpeg)

* * *

So what exactly are you trying to do.

> I want to access some variables,

The LB needs to know variables of the actor, sure - right click the Return Value pin and promote to variable - that’s the hard actor reference now. You can use it as is, no need to cast.

> All what’s needed is to access and  
> change the root Data so that the  
> instances will inherit that Data

Not sure what that means. What’s root data? Class Default?

* * *

But I feel I’m missing the point. Consider describing the end result. No idea why the question is about casting in the first place, there’s no casting needed here.

---

<div class="post-metadata">

**Author:** ![unrealredist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unrealredist](https://forums.unrealengine.com/u/unrealredist)\
**Post date:** [March 15, 2021, 12:08pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/7 "2021-03-15T12:08:40Z")

</div>

Oops sorry… I said it wrong it was not spawn actor

How it works is that I load a level instance  
And in that level is a blueprint amongst the other items  
so I cant just spawn it there because its in that level

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 15, 2021, 12:14pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/8 "2021-03-15T12:14:05Z")

</div>

I am really sorry, but I don’t understand the intent or setup.

What _exactly_ is stopping you from dragging the reference to the Level Blueprint?

* * *

Alternatively, select it in the Outliner and right click in the graph to create a reference:

 ![332506-drag.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/6/e/26e48c030262dd06304a74b92c8ce242ca26d8af.jpeg)

Still, no casting. I feel like I’m missing something, though.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 15, 2021, 12:14pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/9 "2021-03-15T12:14:43Z")

</div>

That’s whole point of the Level Blueprint.

---

<div class="post-metadata">

**Author:** ![unrealredist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unrealredist](https://forums.unrealengine.com/u/unrealredist)\
**Post date:** [March 15, 2021, 12:33pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/10 "2021-03-15T12:33:16Z")

</div>

well this did not turn out so simple  
Over all overview

- This game is a Sidescroller

- As you run it loads levels ahead of you and unloads behind you

- It uses the Level Blueprint in order to do that

- The Thing is I want to access the variable that has the speed rate so as you go on the speed increases

- but I can’t access it because it does not exist at the moment

- and I tried doing that but it only did it on that Individual one

- So What’s needed is to change the original actor’s property so that the instances will inherit from that original actor

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8b861900](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8b861900](https://forums.unrealengine.com/u/anonymous_user_8b861900)\
**Post date:** [March 15, 2021, 12:39pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/11 "2021-03-15T12:39:40Z")

</div>

In the return value node you can promote to variable . this way if its in the game mode(for instance) you can always access that class via the game mode. For instance spawning a hud or widget and then you promote it to a variable when next you want to add it to viewport you don’t need to use crate widget but simply get that variable and then add it to viewport. Hope this helped. Let me know if my description wasn’t clear enough on . Hope this helped

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 15, 2021, 12:40pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/12 "2021-03-15T12:40:36Z")

</div>

> The Thing is I want to access the  
> variable that has the speed rate so as  
> you go on the speed increases

Is this like a power up that the player runs into? Or an effect of that entire level? So there’s an actor in the level and this actor needs to send the data to who, the player? Or to some other actors - are those actors in this level? This is so confusing.

> So What’s needed is to change the  
> original actor’s property so that the  
> instances will inherit from that  
> original actor

I don’t get it, sorry.

> The Thing is I want to access the  
> variable that has the speed rate so as  
> you go on the speed increases

But again, who needs to access that variable, the player?!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8b861900](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8b861900](https://forums.unrealengine.com/u/anonymous_user_8b861900)\
**Post date:** [March 15, 2021, 1:45pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/13 "2021-03-15T13:45:15Z")

</div>

To keep it simple, every blueprint class when being spawned can be promoted to a variable even widgets. I do what your describing by promoting what is spawned to a variable(object reference variable). This way if it was spawned through the game mode or instance (preferably game instance so it is accessible in all levels till you restart your app) you just need to cast to game instance , then get the variable(of spawned object ex character), then from that you can get your value. I’ll add a screenshot that i feel is the simplest implementation of this. I add my HUDs through my game mode and whenever i want to access their variables on whatever level i am i just call it from there.

 ![332484-3-here-is-my-hud-creation-function-if-it-doesnt-ex.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/d/fddc85195753145e4e0827aae8f1f99a28e27cc1.jpeg)

. Jut check game instances it exists even if the level is reset, until the game exits.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8b861900](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8b861900](https://forums.unrealengine.com/u/anonymous_user_8b861900)\
**Post date:** [March 15, 2021, 1:52pm UTC](https://forums.unrealengine.com/t/simple-question-how-to-cast-to-another-bp-from-a-level-bp/480324/14 "2021-03-15T13:52:30Z")

</div>

![332524-simple.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/0/3806cf8518267b579438fccba33a6cf7f3b50462.png)
