Getting the Actor Name at Runtime?!

Hello dear community

I’ve a problem with Line Trace which in the editor when it hits an actor it gets the name, according to the name it displays different UI’s.
Although I recently realized getting the actor name on Runtime or outside of Editor is not that straight forward.

Does anyone have experience with the issue?


I am open for both a solution to getting an actor’s name in a different way or
working around this ‘‘specifiying by the name’’ thing and finding another way to specify each actor in the blueprint.

For example is it possible to use Material and/or Texture names since all those actors have different Materials assign I can identify them via their Material names.

Thanks a lot in advance

Yours virtually

Perhaps what you want to use is Get Display Name instead of Get Name.

Hi man,

one special way to do it is add to these actor a special functionality with “Blueprint interfaces”
Basically you can add this Interfaces to all the actors you want.
So you can pull out from the “Actor reference” unknown a “Message” as you can see here.
You dont have to be sure of the type of actor you are talking,
if the actor have the Interface, he will do it, otherwise no.

I just print his actor name but you can do whatever you want.

here a superclear videotutorial on youtube WTF Is? Blueprint Interface - YouTube

Hey Est_engine

Thanks for your response!

One thing I couldn’t get, do I need to use these BP interfaces in each of my BP actors?
If else how does it know which specific item is being interacted with and pull out the correct UI Widget?

Oh god I was on this single thing since morning, now it works like a charm.
Thanks dude I really appreciate it.

Have a nice day!