Changing a custom widget variable from an animation?

I’ve got a custom C++ subclass of a UUserWidget, and a variable float TweenPercent; that I’m using to control the appearance of my widget in NativeTick.

I would really like to be able to control this C+±defined variable from the UMG animation system. I’m doing a complex animation so a graph editor is really required :slight_smile:

Is this possible?

I know this is old but I’ve got the answer for you! All you need to do is add a properly named setter for the UPROPERTY you want to edit in the animation curve editor!

For example:

class UMyUserWidget : public UUserWidget
{
    GENERATED_BODY()

public:
    UPROPERTY(EditAnywhere, BlueprintReadOnly)
    float MyAnimatableValue;

    UFUNCTION(BlueprintCallable)
    void SetMyAnimatableValue(const float NewValue);
};

Once you’ve done this it should appear as an animatable track!