However, I’ve made quite some progress with other aspects of the game, and the animation stopped working.
I don’t feel like the other aspects of the game could have broken this feature, as you’ll see, it’s pretty basic.
I’m wondering if it’s because I’ve upgraded from 2.25 to 2.26.
Here is the blueprint on the actor:
Here is the blueprint on the Widget:
As I mentioned, everything works, except the animation:
I tried creating the widget on the player controller to show it directly on screen, and play the animation, and the animation worked.
However, when using the play animation:
I tried creating another animation, and replace the original one, still no animation.
I added a print string after the “Play animation”, I saw the text.
I replaced the play animation with finished event, and wire the print string on complete, I didn’t see the text.
So in summary, I’m unable to get the animation as it used to work, but I’m still able to play the animation from something else than the widget in the blueprint… I really have no clue!
I created a new widget, a simple button with text, created a new animation, hooked the Blueprint Interface, and still, the widget is visible, but the animation won’t play.
I also tried to cast the widget and run a custom function activating the animation, but it still doesn’t work…
i dont know a lot about widget animations, but I see you’re setting visibility and custom render depth. Try just having everything visible all the time and see if you can trigger the animation using a keyboard button, instead of using all that HighlightObject logic. Just have a really simple logic like Press SpaceBar > Call Custom Event > Play Animation
or maybe the animation is starting at the end, so when you play the animation, it’s already over… just throwing ideas out there
We ran into a different issue that nevertheless someone might come across too. We created a new Widget Component within an Actor to replace an older version, but did not set the Visible bool to True for the new Widget Component. This resulted in two things. (1) The animations for the Widget itself would never play (we tested by adding Events to animations that never fired). (2) The Widget function “IsVisible” would always return False even when the Widget itself was set to Visible. It
looks like the “IsVisible” function of the Widget evaluates the Widget Component that’s using it.
After Widget Component was set to True, the “IsVisible” for the Widget would evaluate to True as well. The animations would also play. Setting the Widget Component to Visible fixed these issues.