Set variable in another blueprint not working

I have a problem with my blueprint communication. I want to chose in my main menu between 2 models.
So this is the way i’m trying this:

  1. In my main menu I have 2 buttons (1 for each model), when pressed it sets a variable from my pawn-blueprint to a specific class (see image below):

  1. For example: If you clicked on ButtonModel1, the variable needs to be set to the actor: ‘Actortest’

  2. Then the MainMenu removes itself from the viewport(/parent)

  3. In my pawn-blueprint when clicked in the world it should spawn an Actor, which has as input the variable set in the MainMenu. See image below:

  1. At this point I am not sure what it does, because the blueprint takes the default value of the variable and not the variable which was set (in our example ‘Actortest’).
    I think the communication between those 2 blueprints doesn’t really work. But I don’t know how to fix this. So help is appriciated.

Thanks in advance!

How do you get your ReferenceARpawn variable?

Agreed, I think it’s not set…

At variable type i set the pawn-blueprint as object reference and also set the Instance Editable on.
Image below:

Right, you have not set it to an actual instance though…

That doesn’t give you a reference to your pawn.
See the attached Screenshot, that way it should work for you.

You may also read through the documentation about casting [here][1].

Okay i added the cast to ‘yourpawn’ and now it works!

Thanks for your time!