x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: UE 4.21
Tags:
more ▼

asked Jan 21 '19 at 12:19 PM in C++ Programming

avatar image

jury.verrigni1
1 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first
more ▼

answered Jan 22 '19 at 11:55 AM

avatar image

jury.verrigni1
1 2 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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 :)

more ▼

answered Jan 22 '19 at 11:45 AM

avatar image

AmphDev
1.5k 15 9 33

avatar image jury.verrigni1 Jan 22 '19 at 11:53 AM

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 :)

Jury

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question