It’s just a blueprint with a static mesh as parent and then a widget as child of the static mesh.
I made a blueprint widget separately that I use as the Widget Class and then set the Space to World.
When I look in the editor I see this:
But when I play, this is what happens:
I am quite confused as to why this is happening. What do you need to know to help me fix this? Or is this a known issue?
Your widget is rendering because it is showing in the viewport, the tags ‘Item Name’ and ‘Item Description’ make me think those text boxes are bound to a function or variables of some sort, are you sure theyre not being initialised as blank? so it would look like its not rendering at all. Although that would not explain why the white border isnt showing.
Another thing is that in the second photo, the widget is rotated to face the player, if this is set up on Tick to always rotate to face player try adding 180 degrees to the yaw of that rotation.
Apart from that, show some screenshots of your blueprint settings and event graphs
I dont think any of your variables are being initialised, which is why your border isnt appearing too, because its being set with the Quality ENUM. Does your ‘WeaponInfo’ variable in your ‘SuperSword’ BP have any default values set?
That cast you have set up to your widget should work, it just is sending blank values.
Also in your widget component do not use the ‘Bind’ event, this is called every frame and is bad for performance, it would be better to create a Custom Event and call it when the player interacts with the object to update the values only once.
Okay I made it work now.
I did what you said in terms of making the different elements (item text, description and border) variables and then access those instead of binding. Then I took all the initialisation logic of the widget out of the Construction script and put it at BeginPlay instead. And now it shows: