UMG, fade available in the editor but not ingame

People,
The preview of my fade is OK inside the UMG editor, the timeline shows me the opacity changes during the length I’ve setup. But ingame the opacity change doesn’t work. I’ve triple checked the node who triggers the animation, everything is correct and fire properly.

Any tips? It looks like a bug.

13258ffdbf6356b086063ebae4a3d384840aa1f7.jpeg

Try creating a *CustomEvent *inside your widget and hook up your animation there. When you Create the widget, add to viewport and fire that event.

Thx Everynone

Unfortunately I’ve already tried to put the (Play Animation) inside the widget, it doesn’t work better.

The setup looks fine; could you perhaps show us how you’re firing the event. And how do you know it actually triggers? The *Fade *image is set to something else than hidden or collapsed? Why can’t we see the buttons? So many questions! o_O

how do you know it actually triggers?
I’ve added a log (Print Text) after the (Play Animation), it is well trigger.

The strange thing is that when I replace this widget with another widget that also has a fade who work well, it does not work anymore. It seems that the location of this event prevent the fade to start (only the fade).

Yeah, that’s why I suggested you kept the event triggering the animation inside the widget itself but you’ve tried that.
Add a variable of type your-widget and store the reference there. You never mentioned whether you see the widget at all or is it just the animation not kicking in?

Also, check the output log, see if you’re getting any warnings/errors.

If its just a fade for starting a level, just put it in the level blueprint Like I did. For each level you’ll need to add this code.

Ive only gotten 1 animation to work on a text in a widget. Animating a text on my hud never worked no matter what i tried.

Fading with widgets is an incredible pain in the rear area…seems like such a simple thing but even the simplest things in this engine require rocket science background :smiley:

I’d disagree. I’ve got quite a fair bit of animated interface elements, transitions, fade ins/outs, a function that Z-orders around 150 onscreen widgets and alters their opacity in real time and it works surprisingly well. What I’d agree with is that it’s easy to get frustrated with UMG and its limitations become quite obvious after a while.

I replicated Op’s setup, hooked up the animation to the widget’s construct event and it works fine. Op is hiding something ;p

Video tutorial :smiley: Go Go Go hehe especially about fade in and fade out between menu pages…almost every tut out there isn’t doing what looks good…they do some random button ****

I’m still using the widget component in the viewport of my Character…its sort of flags behind him. I wish there was a better way for in game hud…maybe there is but…

I mean, the idea behind it is straightforward I believe, which part is problematic?

We’ll be controlling the opacity of the border that houses a vertical box and its children

  • In Animation, add the animation
  • In Timeline, add which element to animate
  • Add a Track, in this case Content Color And Opacity
  • Move the slider to the desired position and + a keyframe for opacity, set it to desired value

Custom event in the widget will drive the animation:

Call it as needed; in this case, it’s in the HUD BP:

edit: tip - if you want to access *PlayMode *enum, you can drag&drop the pin from *PlayAnimation *onto the CustomEvent, that enum is somehow not available normally


playmode.png

OK, I found the origin of the problem.
Another blueprint started the same widget (but without trigger the animation) and not at the same frame. So the animation initialized with the first widget was overridden by the second widget without animation… human error !

Thx again for your help on this thread, I’ve appreciated your efforts guys.