Tick event not firing on UMG widgets after 4.20 upgrade

After upgrading my projects from 4.19 to 4.20 the tick event has stopped working completely on all of my UMG widgets that have a C++ parent class, which is pretty much all of them. I made a quick test widget without a C++ parent class and the tick event worked fine in it. I tried playing with the new “Tick Frequency” setting on the widgets and got nothing. I tried deleting and re-adding the tick event and got nothing. I tried overriding the tick event in C++ and threw in a debug print on it and got nothing from the native tick either. Ive done the old delete the intermediate folder, rebuild, blah blah. Other things in the widgets like construct event, button clicks, etc work fine.

I made a new C++ UserWidget class and set the test widgets parent class to it, as soon as the you change the parent class and recompile the project the tick event stops working. Going to start digging through the engine code and see if I can figure whats changed, I suspect it has to do with the new “Tick Frequency” setting on the widgets.

So if I dont override the NativeConstruct in the parent class the tick event works fine

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

Ok so of course right after I submitted the bug report I figured out what was wrong. Turns out Im stupid and there is nothing wrong with the tick event, I forgot to add the super into the NativeConstruct and there is a new function call in there that mine was missing since I forgot the super. So in short nothing to see here folks carry on and hopefully you can go in and kill the bug report I submitted, sorry :frowning:

1 Like

haha, same problem, same reason

Not to be rude but could you explain how to do this in the blueprint please? I have the same issue but not so good with blueprints (The blueprint I’m working on was made by someone else).

Thank you :slight_smile:

Im not sure if our problems are the same even if the error is. Mine was caused by my custom C++ parent class of a blueprint not the blueprint itself. There would have been no way to fix my problem in the blueprint.

Ah dam, thank you though :slight_smile:

Make sure you’re using native construct like this :

void UClass::NativeConstruct()
{
	Super::NativeConstruct();

	// your code here
}

If you don’t call Super::NativeConstruct(); then NativeTick() won’t be called!

1 Like

In blueprint to run the super function you right-click the function entry node and choose I think it’s called parent function override or something like that. It makes an orange node that runs the super.

I have a widget asset that serves as the character inventory. It has a bunch of child widget elements that update on event tick to reflect character information. This widget asset is created and added to the viewport on player demand and removed from the viewport on player demand. When this widget asset is no longer displayed on the viewport, does it still tick? And if it does, how can I disable event tick for this widget instance upon being removed from the viewport in order to improve performance? regards airytv & yacine tv