Read variable value from UProperty of different types

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.