Animation Property Access System in C++?

https://docs.unrealengine.com/5.0/en-US/animation-optimization-in-unreal-engine/

This is basically just like using a regular AnimInstance, but you’re consolidating all of your variables and update activity in the FAnimInstanceProxy, which is a friend struct of the AnimInstance. I’m not actually sure why the Proxy would need to access the AnimInstance’s variables (I’m sure someone out there knows something I don’t).

The Proxy is where you would put your variables, and you can think of virtual void update() override almost like NativeUpdateAnimation. There are additional functions like FAnimInstanceProxy::PreUpdate, FAnimInstanceProxy::PreEvaluateAnimation, and FAnimInstanceProxy::PostUpdate that you can implement and use in addition to update() depending on your use cases (I haven’t used these, myself).

In your Animation Blueprint, you can use the property access from the right-click context menu and access your variables via Proxy.<variable>.

image

From what I gather, the Proxy is basically a wrapper for your AnimInstance data that’s automagically managed by UE’s multi-threaded animation update system. I believe there’s no need to worry about locks or synchronization. Using “Property Access” to read your variables into your animation blueprint ensures that they will only be accessed when it is safe for the blueprint to do so (less for you to worry about).

To be honest, I haven’t really used it that much and I would just stick with the blueprint stuff and avoid the FAnimInstanceProxy :rofl: