Reading variable from User Defined Struct in c++

I made Structure in Unreal’s interface and referenced it with “UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animations) class UStruct* Struct_Animations;” in header. (and assigned it from within Unreal) Now, how can I access one of the variables from that struct in some function in .cpp? It’s a beginner’s question, I know, but I just don’t know where to look for an answer.

First of all UStruct contains type of stuct not struct it self same as UClass. You would need to read property of the UClass of blueprint and then read the struct data using UStructProperty and read it off properties same way you do from class, here example of reading properties over here:

Or you can do it a lot easier way… just delere struct in C++, then you can easily keep it in varable in C++ and use it as Blueprint struct in in same time (BlueprintType makes struct usable in blueprints as a type)

USTRUCT(BlueprintType)
struct FMyStruct {

       GENERATED_BODY()

       UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Something")
       int32 MyInt;

       //more properties here
}

and then just make varable

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Animations) 
FMyStruct Struct_Animations;

This is so much better. Thanks!