My array saving doesn't work

As clockwork says, you have some nodes not quite setup right per how I was trying to write it, sorry I didn’t provide any images.

His examples should be all you need.

He is using a Map, but if you want to save more then just Transforms, a Struct does work just fine as well.

Edit:
Here’s what I was trying to explain, using Structs…

Struct is setup like this, add more variables if you want to save more attributes

Save Game Object has an Array of the Struct, each item of the Array contains all the data for 1 actor you are saving, keeping everything together.

In a Save Game Function, I like to use Local Variable to Prepare the data, especially with large save systems with tons of data, then set my Save Game Object at the very end, once all my data is prepared, then save that to a Slot.

Local Variables don’t need to be cleared first, as they already are by default.

1 Like