Saving Complex Parameters

Hi all,
Up until now I managed to use the Save Game Object to save simple parameters (like like strings, floats and even skeletal meshes. Now I’m trying to save an object I created with multiple parameters inside of it and not only that, I want to save an array of them.
I tried doing it the usual way and while when moving from one level to another works, when I close and reopen the game the array is empty, meaning it didn’t really save it.
Is there another way that I’m not aware of to save objects and/or arrays?

You can’t save objects, you can only save their data. Look into marketplace plugins if you do not want to deal with the native, and rather underwhelming, save game system.

  • create structs to represent actor data:

  • each actor holds manipulates its own struct (strings, floats and even skeletal meshes):

  • a Save Game object holds an array of those structs (nested arrays are a thing, too):

We loop through the entities in the world, fetch their structs and push them into the array in the Save Game Object; which we can then save to disk.

When we load the game, loop through the array and re pawn actors using the data in the struct array.


The above suggestion focuses on arrays but is otherwise incomplete; for the the whole process:

Saved me again. thanks!

1 Like