Can I record a variable in nested class by timeline or animation?

I want to record a variable in nested class by timeline or animation, but it do not work correctly. Is it not support ?

The pictures below are my timeline test code, the variable Config Float B and V3B do not update when I play the timeline, sometimes the Config is null.

Also, I try animation. But animation window do not provide to record a variable in nested class.

How to solve the problem? Thank you very much

Change the configuration class to a struct. Timelines Custom Behaviours only support animating structs, and not classes.

The null reference exception can be fixed by assigning a default object to the Config variable (i.e. public Config config = new Config())