Evening, I hope someone can be of assistance as this problem is driving me nuts!
I have an inventory system built using UMG, with a simple widget to represent items (these sit in a grid panel). The widget has a button and two images, a plain black one to act as a background and the thumbnail on top. In this widget I have an animation called ‘ChangeOpacity’ that consists of a single ‘Colour and Opacity’ track that just changes from 0.9 opacity to 0.4 opacity.
I’ve set it up so that when the OnPressed event on the button fires, the ChangeOpacity animation plays forward and on the OnReleased event the animation plays backward. So far so good, I can press and release the mouse button any number of times and the opacity goes down and up each time.
However, as soon as I drag and drop it to another slot (which itself works fine), the opacity will no longer change. Now, the strange thing is that I’m fairly sure the animation is actually playing forwards and backwards because:
- There are no compile errors and the execution pulse continues past the PlayAnimation node;
- if I use the OnAnimationStarted and OnAnimationFinished events I can print strings to the screen; and
- most tellingly, if I add a Transform track to the same animation (to say, rotate and un-rotate the image), that works!
I’m flummoxed at the moment. I’m loath to assume it’s a bug in UE4 rather than something I’ve done wrong but I’m beginning to think it might be.