Can I have a TUnion as a UProperty?

I have tried adding a TUnion type to a C++ class and marking it as a UProperty. This fails to compile. Is there any way to make this work? If not, what do I need to be aware of if this variable is left as a non-UProperty?

Hello…

Actually i did not tried, but since it failing maybe TUnion isnt finished or not added to reflection system.
Documentation also limited for this, so i just know what you know…

However you can still use this without uproperty, but you need keep in mind without uproperty you ignore unreal’s reflection system fully…

That means:

  • tunion variable cant be used in any blueprint
  • tunion variable cant be replicated via ue network

and so

Rama talked about unions a little bit: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

and there is a forum post also about this: Unions and TUnion - C++ Programming - Unreal Engine Forums