Serializing UObjects

Hiya,

Is there any nice way to serialize an uobject? I just want to store all the uproperties and eventually deserialize them into a new uobject.
I don’t care about networking if that matters.

I tried playing with FBitWriter but it doesn’t seem to work for me, all i get is an array of 0s or in the best case an array of 0 with a 0x1 at the beginning :s

Many thanks,

Jury

Hi,
Thanks for your answer!
I managed to find a few classes that would in the end serialize uobjects and all their uproperties!
I’m gonna add it as an aswer and close the question :slight_smile:

Jury

Hi,

I’ve managed to find a way to do it!
FObjectWriter and FObjectReader did the job :slight_smile:

Hey,

Im not fully sure about this, but there is a “big” topic with lot of code about this created by TheJamsh and Rumbleball mostly… However the topic is about serialization and sending through rpc, but
I did not tried his code and you may need source built ue4, but maybe helps
https://forums.unrealengine.com/development-discussion/c-gameplay-programming/111612-serialize-a-uobject-so-it-can-be-sent-via-an-rpc-over-the-network

Also i leave this here (made by Rama): https://wiki.unrealengine.com/Save_System,Read%26_Write_Any_Data_to_Compressed_Binary_Files

This can be a workaround, but you need serialize properties one by one :slight_smile: