Hello, I am working on adding saves to my game and I want to store all the players information as an object. It saves fine, but when I try to load the save game object it return s unknown for the player info. Here’s the code for saving.
I don’t show it here, but I do save the save game object to a slot.
That part looks ok, but most people make a mistake with handling the actual save game. Can you show the saving and loading code?
Here is Saving:
Loading happens in two places first the save is retrieved
And then its loaded into the game
There’s quite a lot going on here, so I haven’t looked in great detail. The main thing I noticed is the use of ‘open level’.
This will throw everything away apart from the game instance. So if you’re loading anything ( that’s not the GI ) and then calling ‘open level’, it will be binned.
You need to open the level, and then load the save game from within that level.
My bad, what happens is when the level opens it triggers a function in the controller that takes the string with the name of the current save and loads it. This works for the other two things I’m trying to save(arrays of item class’s and transforms), but loading the object with player info returns unknown. I think the problem might be that its saving the object as a pointer, so when the game is reloaded it points toward nothing. Is there anyway to save the actual object instead of just a pointer? Its just an object with pointers. If all else fails I can just add each of the variables individually to the save, but that wouldn’t be as clean.
Saving references doesn’t work 
You can save the class and transform, for instance…
Greetings @JadedTester7461
I saw you were having some issues that were being worked on with Clockwork. Were you able to resolve them?