Read variable value from UProperty of different types
I am trying to read the variable values from different blueprint components and while I was able to find how to do that for some variable types like float, double, bool and int I am not able to figure out how to do it for anything else. For example variables of type FVector, FRotator or any type of struct/enum/class. So how do I get the variable values for lets say a FVector, and do the other types work the same way?
I found that a FVector is a UStructProperty but I cant manage to access the vectors x, y, and z.
The following example is part of the code I have now where I successfully find bool and float values.
I should also point out that I will use this for a plugin so I have to find the properties from existing blueprints. So creating my own c++ class and use that when creating the blueprints is not an option.
Thanks in advance.
asked Mar 12 '15 at 10:42 PM in C++ Programming
I solved it myself by using "UProperty::ContainerPtrToValuePtr". I had tried it before posting this question but for some reason I could not get it to work on the first try. By using this I successfully read the values from all component properties.
answered Mar 16 '15 at 04:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here