Integration Issues Between C++ and Blueprints

I have defined some variables in C++ and want to get them in animation blueprints and widget blueprints to use their values for animating, but I failed. There’s a “variable is not in scope” prompt when trying to get the variables. Can anyone help me with this? Thank you!!!