How to adapt "IsValid" node logic for a thread safe environment?

I have some logic in my Event Graph that needs to be moved to the BlueprintThreadSafeUpdationAnimation function (like how Lyra works).

I have a section that uses e.g. Try Get Pawn Owner → Get Component by Class → Is Valid, etc, to help make variables from it.
But Is Valid is not thread safe.

How can this be done?

5 Likes

Bump, this would be nice to have a solution for, I will post it here if I find one.

The Lyra project handles it with a not equals check with an empty reference (blueprint equivalent of nullptr?) like so:

I guess this is the Epic-recommended solution, but it would be interesting if someone from Epic could confirm this.

1 Like