I have a SaveGame object. That object contains an array of UObject type variables (Blue print). I would like to Save and Load my SaveGame Object, using SaveGameToSlot (etc) and re load it.
It seems by default that Refrences to UObjects are not serialized even if flagged a SaveGame data in the SaveGame BluePrint.
How can I save and load my data with references.
In my specific case, there is only one active reference in the tree being saved. There are no circular references. Its basically like they are directly held by the objects, its just that Unreal doesn’t allow non reference assignments of UObjects as properties.
Pointers and References are basically ways of holding a reference to a place of computer memory. You can’t serialize them. What you need to do is re-spawn the actors and recreate the objects with data that you can serialize (primitive types).
I am aware of references and pointers, many serialization schemes account for these automatically, with caveats. For example Java. I read that but since Actor is a more involved class than UObject my hope was there is a different answer for those.
So I need to mirror all of my UObject data as UStructs and translate between them at save time? Seems like quite a chore.