Animation BP gives errors related to character reference even though everything works

I’m trying to take out all the casting in my animation blueprint to help the games performance. What I am seeing is that everything works in game, BUT, every time I try to set a variable using my ‘Player Base’ variable I get an error.

Why happen and how fix?

The first two pictures are inside my animBP



I believe the anim bp can call Event Blueprint Update Animation before Begin Play happens. So you should check if Player Base is valid before executing the sequence. The reason it still works is because Player Base is only invalid for the first three frames, then everything runs smoothly.

Bonus: It is best practice to not use Event Blueprint Update Animation but instead override the threadsafe blueprint update function of the anim bp for better performance. Look up a tutorial on how to do this since you also need to understand threadsafe property accessors.

1 Like