Is that appropriate having a UPROPERTY() member inside a Non-UObject class
I have seen this for a couple of times when I have a UPROPERTY() member pointer inside a F-prefixed class (one that does not inherit from UObject). As entering PIE mode, the pointer is always reset to default value being set inside the class.
So I guess there is no meaning of having that member for a non-UObject class, right?
Thanks in advance for any confirmation!
asked Mar 18 '19 at 09:01 AM in Using UE4
Yes, UE4 reflection system only supports UObjects with UCLASS and you can use UPROPERTY also in USTRUCT
Note that those are just markers for UHT to generate extra code that registers those property, they are empty macros so compiler simply paste nothing and won't throw any error regardless where you place them GENERATED_BODY() is the spot where everything is pasted to the class.
answered Mar 18 '19 at 09:31 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here