Some buttons in my Vertical Box going invisible before sliding off screen.

Hey guys,

I’m creating UI using UMG, and I have one of my vertical boxes slide off screen to be replaced by another using a combination of Timeline, Ease, and Set Translation

Super simple, and it works fine for the vertical box.

However, the issue is that some of the buttons inside the vertical box will disappear before the vertical box slides off the screen!

241473-2sss5cz-imgur.gif

Any idea why this would be happening? I’ll be around for most of the day if you want any additional info, I’m mostly just wondering if this has happened to anyone else, so I can try to figure out what’s going on for myself. Thanks in advance dudes!

MikeMoore

EDIT:

Turns out the issue was the Vertical Box was backwards/inside out, so the buttons were actually outside of the bounds of the vertical box, and are attached to the leftmost side of the vertical box, but the leftmost side was actually to the right of the rightmost side. ¯\(ツ)

Works fine now, as you can see.

241554-gu6zjfm-imgur.gif

First of all, why aren’t you using widget animations for this? You might have your own reasons like using this very Timeline for something else. If that’s not the case, you can achieve much more flexibility with much less effort using widget animations.

The behaviour you’re observing might be caused by the widgets sliding off the viewport/canvas (not sure how you’ve setup the hierarchy). Generally speaking, widgets do not tick while off screen. Perhaps the buttons fail to update correctly when their centre exceeds screen boundaries.

Do consider looking into animations, will save you a headache or two.

You definitely can. You extend the widget and it becomes a self-contained object with its own animation. Besides, you’re simply animating the container in this very instance, which makes things even easier.

Have a look at this, perhaps it will inspire you. Here, the buttons are spawned dynamically during run-time and animated:


https://gyazo.com/a15fcb2c6497a8ddbb7314fa959b52b9

edit: I think that what you meant is that you cannot supply animations with dynamic values. That’s correct until you start digging into Slate. But that’s another story. Perhaps the issue here is how you approach the animation. Since it’s a static menu, do the animations really need dynamic values?

Also, the behaviour you’re describe and demonstrate is a bit random, I’ll admit. One thing you could try is to change the tick behaviour for the object that currently own the timeline, it’s a small hidden panel at the top of the class defaults. Try changing the Tick Group to Post Update Work.

I am using a timeline because everything is generated at runtime, and you can not create animations for widgets that do not exist prior to runtime. The buttons are all the exact same widget blueprint added as children to a vertical box, so why would some widgets disappear and not others if they’re all identical? It’s almost like the game thinks the canvas is smaller than it actually is.

Turns out the issue was the Vertical Box was backwards/inside out, so the buttons were actually outside of the bounds of the vertical box, and are attached to the leftmost side of the vertical box, but the leftmost side was actually to the right of the rightmost side. ¯\(ツ)

Works fine now, as you can see.

241554-gu6zjfm-imgur.gif