Download

Checking whether variable is None in animation state graph

I have an animation BP with a state machine and a few states. In the event graph at the event “Blueprint Initialize Animation” I save a reference to the pawn owner to a variable. Now, in one of the states I want to use that variable. But since sometimes it is None (i.e. not set (yet)), I get warnings about “trying to access None”.

Since there is not execution path in a state, I don’t see how one could use a branch node to check whether a variable is None at the moment. How else can I achieve this in an animation state graph?