SaveGame Data with refrences

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.

Please help me figure out how to save.

Thanks,

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

Of course you can do what Saving Whole Actors in SaveGame - Blueprint Visual Scripting - Unreal Engine Forums Bruno here so… opportunistically suggests and buy his own plugin for 30 dollars.

Although if you read what eXi says just below Saving Whole Actors in SaveGame - #7 by eXi - Blueprint Visual Scripting - Unreal Engine Forums he gives a much better explaination.

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.

there are tools and etc to help that such as you can convert ustructs to json.