You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was preparing the code when it clicked it my brain: Update is not invoked if the checkbox Receives Events for the canvas is checked off. The comment for this checkbox says though that it should be used to disable input events.
I think it should. My understanding is the following:
Creating a canvas which does not receive input is useful. It may be used for Player's HUD which never interacts with mouse, just displays info.
Such canvas should still be update-able. For example health bars, map markers, etc. Time dependence allows for animations. That's why it takes delta time as a param.
Control has separate Update and Draw to distinguish the process of drawing and updating state, meaning that the engine may draw the control multiple times between updates, and vice versa. (As I remember Unity can do that.)
Ultimately, to modify if a script is updating, the engine uses Enabled. If so, the controls should follow it.
Issue description:
Custom UI controls don't receive invokes on
override void Update(float deltaTime)
event method. This breaks existing controls.Steps to reproduce:
Flax version:
1.8, I think it was NOT in 1.7
The text was updated successfully, but these errors were encountered: