Iterate over Properties of Struct in C++
I try to iterate over the properties of a structure, but I just can't figure out how.
I have this example struct:
And this is code from the BeginPlay of an Actor in the scene:
The loop isn't executed at all, but my understanding is that the loop should run four times.
Could someone point me in the right direction?
asked Mar 26 '19 at 04:17 PM in C++ Programming
You forgot to add UPROPERTY() to struct variables. UE4 only see things that are marked with those macros, UHT gathers information about them and generate code that register those properties in to reflection system, which you later read out in the this code.
Follow this question
Once you sign in you will be able to subscribe for any updates here