How can I show messages to the user like UE_LOG does using a User Widget?

Hi!

I’m using Unreal 5.1.1.

How can I show messages to the user like UE_LOG does?

I think I can create a delegate and, when a process ends, call it with the message I want to show to the player.

I want to do it in APlayerController::BeginPlayingState(). I need to do it there because I’m going to connect to a web service and then, to a database.

I don’t know a lot about Unreal, so I could be wrong.

By the way, I’m not going to use UE_LOG because these messages are not for debug.

Thanks.

Try Draw Debug String:

This doesn’t use a widget, but it’s also super simple to do, much easier than a widget.

If you actually want a really nice user presentation with customizable widgets, ignore this. But given your question I’m guessing you don’t really care about widgets, you just want a visible message presented for debugging.

Thanks.

No, sorry. I haven’t mention that I’m not going to use UE_LOG because these messages are not for debug.

I said that these messages are for the player, from what I understood that it was clear that they were not for debugging.

I see. In that case, the answer is much more complex. :slight_smile:

Try this for a general purpose (UE4) way to put text on a widget for the user.

In UE5 depending on what framework you use, there are other ways, but that’s a good start.

CustomLog

You could make it in the following way:

  1. Create a UserWidget like this:

  2. Create a custom TextBlock and tweak text properties:


  3. Make a function to add a message to your log:

  4. Add events to enter different messages:

  5. Test:

My Products

1 Like