How do i get a thread safe reference to an ActorComponent in AnimInstance? (ThreadSafeUpdateAnimation)

Getting the reference to the component without warnings.

I did it like this.


UFUNCTION(BlueprintPure, meta = (BlueprintThreadSafe))
static const UWeaponAttacher *GetdWeaponAttacherComponentThreadSafe(const AActor *Owner);

I hope there are not problems… all access to UObjects are “read-only”.

I will continue testing… if I see that there are not problems I will consider the answer valid.

Anyway, if someone who really knows how this works could give their opinion, I would be very grateful…

I’m just experimenting based on test and error (in the absence of examples there is not other option).

Thank you so much!!


UPDATE:


It does work (No crash)… but the performance is not better…

Seems “BlueprintThreadSafeUpdateAnimation” is doing nothing…

Seems it is executing in the Game Thread… it has no sense…