Custom text for 3D Widget - Get all Actors of Class

Hi!

I’m trying to get specific actors from my level and then display a custom text on each of them (that has already been assigned on the specific actor instances in the level through a variable).

This is my widget, where I just have a plain text, which is changed through a variable that is located on the 3D Widget actor I am to use in the level (this is where I’m not sure what I’m doing wrong);

https://puu.sh/xhXTz.png

This is the 3D Widget in the level, that I try to display with a custom text (they are all the same actor, just copy pasted);

https://puu.sh/xhXU0.jpg

And lastly the Actor that has the 3D Widget with the variable “LevelText” that is set to editable. So that I can have a custom text on each instanced actor.

https://puu.sh/xhYqR.jpg

My problem is with the “Get All Actors of Class” node, not sure how to do it for each instanced actor. Tried searching around, I do get examples of other things, bot haven’t found an example for my issue.

I eventually found a solution for this (as seen below).

My solution for this was to have two different blueprints, one widget blueprint and one actor blueprint.
The widget blueprint is just a “Canvas Panel” and a “Text Box”, where the “Canvas Panel” has a width of 250 and a height of 100 (this is just up to how you want it).

https://puu.sh/BYW7B.png

The actor blueprint is the blueprint that will display the widget blueprint as a 3D Widget in the game world.
So this is basically the only thing I did:

https://puu.sh/BYW5N.png

On “even begin play” I cast to “Widget_LevelText” (which is my widget blueprint), with a reference of that widget blueprint connected to “Get user widget object” and then connected to “Object” on the cast node. I then get the text box from the widget blueprint, set a new text for it with “SetText (Text)” node, which has an editable text variable attached to it.

https://puu.sh/BYW5d.png

So now I can basically just copy paste the actor blueprint wherever I want in the game world, and rename each one to have their own specific text attached to it.

https://puu.sh/BYW3o.png

https://puu.sh/BYW4u.png

And that’s how I did it! :slight_smile:
If you know of a more cost-effective way to do it (not sure how cost-effective this is), then please do send me a message!