Custom structure serialization in Unreal Engine

Let’s say you’ve created your own USTRUCT in C++ and now you want to serialize it.
Usually, it’s enough to simply mark the desired fields with SaveGame. But here’s the problem — in order for this to work, the fields themselves must support serialization.
Unfortunately, one of our variables doesn’t.
In my case, it’s a struct called FNonSerializableStruct. Because of that, only the second struct gets serialized, even though we marked both with SaveGame.





