[UMG Tutorial] - Placing Widgets Over Actors In Screenspace

Ok so for people like me who want to know how to do this in version 4.7:

Be sure check on Engine Scalability Settings and set you “resolution Scale” to 100%

1 - Create a widget (In my case is called “PickupText”) with a text box and on the graph just add a text variable and bind the content of the text box to that variable. I create the text box centered like you can see on the image.

&stc=1

On the next image you can see why the text is centered. On The Image the new Widget component for the blueprints:

&stc=1

2 - On you pickup/object/blueprint etc…:

  • Add a widget component and set “widget class” to you widget (In my case is called “PickupText”)
  • Set the UI Space to “Screen”
  • uncheck Visible if you don’t want the widget visible all the time.

&stc=1

On Event Graph:

Event Begin play → Get User Widget Object → Cast to you widget (for get the variables on the widget and add/get/change parameters)

&stc=1

In my case my text widget have 2 variables “PickupText” and “PickUpActor” and I grab the values from my struc “iteminfo”

3- In case you only want to display the widget when you enter a trigger volume, you can use “set visibility” for the widget component:

(in my case I first cast to my character for be sure the trigger collide with my character before display the text)

&stc=1

That’s all, I hope this can help to someone like me

Greetings!