In a c++ widget that’s linked to a BP class, I decalred a new UWidgetAnimation that uses the Transient and BindWidgetAnim tags:
UPROPERTY(Transient, meta = (BindWidgetAnim))
UWidgetAnimation* Spinner;
Then, I created an animation in the BP class, it’s successfully bound to c++, but when I try to play the animation, it just won’t play - even though it is valid, and the log is even printed to the screen.
if (Spinner && Spinner->MovieScene)
{
UUserWidget::PlayAnimation(Spinner, 0.0f, 1, EUMGSequencePlayMode::Forward, 1.0f);
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Orange, FString(“Animation is
PLAYING!!”));
}
I tried calling this code at EventConstruct, Button events, and what not.
Also tried to go with the old method of storing all UWidgetAnimation variables in a TMap (without the Transient and meta = BindWidgetAnim tags), still with no luck.
For some reason none of it seems working for me!
What am I doing wrong?!