Widget Components not updating on Editor. (desperate help claim)

I’ve been struggling with this issue for days. Even posted a few partial questions here in the forum.

It’s so important because I’m preparing the project on which me and other fellow Unreal artist’s will work for weeks, maybe months. It’s CRITICAL I find the best possible workflow.

My question is not too deep or difficult, I guess. My case is pretty simple, but explaining it properly here would need a loooong message, plenty of captures. It would take you minutes to read. Instead of that, I’ve prepared a project with a minimal setup to replicate my issue and captured a video. It’ll take you a few minutes anyway, but much more comfortable for the caritative souls and heroes in the forum.

Here it is.

Any help or clue about this would be providential.

Thanks!

EDIT: I assume this issue is, basically, my lack of understanding of the Engine. In case this is an unexpected behaviour or a bug, and someone with expertise wants to take a 1st hand look at the issue, this is the project as you see in the video capture:
ForumQuestion_Project.zip - Google Drive

I’m swamped today so I don’t think I can dig into your project, but have you tried PreConstruct rather than Construct?

Yes, I also tried PreConstruct. Same results.

Thanks for you interest.

(btw… the values are read from GoogleSheets into the app thanks to your awesome plugin RealTimeDataTable :wink: and your kind help a couple of weeks ago… ).

Heh, glad to hear it’s been useful :slight_smile:

Another idea that comes to mind - make the widget component just an empty widget with a panel to contain the real widget, like SizeBox or something like that.

Have the Construction Script in your BP (not your widget) create an instance of the real widget and then attach it to your Widget Component container box. You can access the widget in your component by pulling out from the the component variable pin and choosing “Get Widget” and casting to the appropriate type.

For the real widget, set the text on Pre Construct using a variable that is instance editable and exposed on spawn. This way you can set the text variable right when the widget is created in the non-widget BP and it should have the correct data displayed.

4 Likes


yes he is :smile:

The funny (and embarrasing) thing is I’ve used a very similar method for a kind of “built-in log and notifications system” in this same app, but barely explored that method for the “on screen” displays. ( Construction Scripts do not accept widget creation nodes. The node is missing on the nodes list, and is rejected with an error if pasted from elsewhere. I guess that’s why I discarded this method so soon. And today I got stuck again with this at the first line of your recipe. LOL. But you can put the widget creation node in a function and call the function! No errors!

Thanks Jared!

1 Like

That’s awesome! I totally forgot about the construction script issue - actor creation and widget creation are disabled from it because construction scripts are run during packaging. I’d recommend trying to package your project like this first, with a few of these in a scene before we celebrate. If it fails, try putting a branch before calling that function that creates the widgets, the condition being ‘if in editor.’

1 Like

Hey, I had the same Problem I tried to follow the suggestion here but it didn’t work for me.
As far as I can tell the problem is that at the end of the construction the widget is recreated so any changes are lost. To fix is the widget needs to be updated after the construction for example with an delay.

  1. Create a Child of the Widget Component.
  2. Create inside an update function with an delay (Construction script Delay doesn’t work on actor as far as I know) this will update the widget after a short delay
  3. Call the update function inside of you the construction script of your actor

Widget Component:


Inside the Actor with the Widget Component:
image

If anyone is interest I use it to display the loot over chests inside the editor:

1 Like

Hi, Kettenotter

Looks a very simple approach. I’ll test it tomorrow, I’m still on time to improve this part of my app.

But I’m not sure to understand.

image

  • So these nodes are in the child widget, the one assigned in the BP component.
  • And the Update function seems to be in the Parent widget. Right?

btw… what’s the target for the function? The graph line goes out of frame.

My parent widget has no textboxes to update. Just a variable to receive the content. The textboxes to update are in the children. How can that function update them from the parent?

Would you capture that update function to take a look? (or elaborate a little on your method, if I’m too lost)

You can actually see to where the target is connected. The card selector goes out of frome. But just in case I made this guide from scratch so that its less confusing: Updating Widget Components Inside the Editor - Guide

For those who do not understand, here are visual screenshots)

[image]





1 Like