Communication between player and widget

I’m trying to print a simple “hello” with a interface, but my player cant send the message to the widget

Player blueprint

Widget blueprint

2.JPG

In my experience, sometimes Print String does not output to the screen until your restart UE4.
It’s a bug, IMO.

I don’t see the node “Add to viewport”, in your player blueprint.

Because this widget is the inventory slot. I’m searching to cast to this widget to set the item thumbnail when a item is pickup:

This is ion the inventory widget


Nope. I restarted a few times and it still without printing anything on the screen. Anyway, the print string node is only for testing. I’m searching for make a communication between the player and the widget.

Did you make a “REF” variable of the widget blueprint ? When you cast to this widget, make a “promote variable”, and if I’m right, you need to make this REF variable “public”.
In this case, it’s more simple to cast to this widget.

d4b5e52cbfc5a5fa63732f2919b8403805943bf2.jpeg

To me it appears like your setup is not correct or you’re trying to do something Unreal can’t.

Here are my ideas (try one at a time):

  • Make sure the widget is actually spawned in the world by adding a print string to its construct event
  • What does the boolean “Top-level only” changes? Idk but maybe you should try your setup with it checked or unchecked and see if it changes anything
  • Try plugging something into the “Owner” input of the “Create widget” node, a simple “GetPlayerController(0)” will do the trick for testing purposes
  • Try adding the widget directly to the player screen instead of adding it as a child of a box (just to try out if it does print)
  • Try looping through the widgets you’ve found in your “GetAllWidgets” instead of taking the shortcut of plugging the array into the function (even if it’s supposed to do the same thing)