No announcement yet.

Getting the Actor Name at Runtime?!

  • Filter
  • Time
  • Show
Clear All
new posts

    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?

    Click image for larger version  Name:	LineTrace1.jpg Views:	0 Size:	185.2 KB ID:	1791289
    Click image for larger version  Name:	LineTrace2.jpg Views:	0 Size:	218.4 KB ID:	1791290

    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
    Last edited by Zboynk; 07-22-2020, 03:48 AM.

    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
    Click image for larger version

Name:	Blueprint_Interface.jpg
Views:	53
Size:	318.6 KB
ID:	1791302

    Attached Files


      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!