Cannot get variable value out of an instanced actorBP

Hi guys,

I am currently working on my first game, and I’m having some issues with blueprints.
So far, I am using 3 different blueprints:

  • One named “ArtBP”, it’s a custom Actor containing a single plane with a “Call in Editor” function. Basically, you input a string in the “InstanceName” variable, and then the Blueprint looks for that name and returns an image to display as well as its size, assign said image as texture for the plane and resize the plane to match the image size. It also returns a brief description of the image.
  • One named “Default_PawnBP”, which is a pawn with 4 linetraces returning the name of the actors hit by them.
  • One named “ArtDataDisplayBP” which is a widget that slides in from the right side when a key is pressed. It contains a single Text Box, that I would like to bind to the image descriptions from ArtBP

You can see all of that in action in the following video:

Now, here is my issue.
I’d like my linetrace to be linked to a key press event instead of on tick (for the sake of optimization), and if an ArtBP actor is hit by the linetraces then the widget slides in with the text box binded to the image description from said ArtBP.

My problem is that when an ArtBP actor is hit by my linetrace, I can get the name of the actor out, but I cannot seem to be able to get the string stored in the “InstanceName” variable of that actor.
I can’t seem to be able to link the actor name with the “InstanceName” string.

Any idea what I could do wrong here?


I think I found a way to solve my problem by using a Map.
So I created a Map String/String, the keys of the map being the display name of my actorBP actors and the values being the “InstanceName” of the actors.

Here is my BluePrint:

This is tied to a “Call In Editor” event, and here is the result when I run the BP:

So for each of the three paintings, the two strings print out fine, meaning the keys should have been added to the Map.
However, when I look at my “Object Instance Name” Map, it remains empty.

Is there something I’m missing here?