I’m making a save object of my player character’s stats and I’m having a problem loading these values. It successfully loads when it’s not saved but loading from a saved value always fails. I’m using the Game Instance. My question is, coz I think this is what I have a misconception and that’s why loading the value fails :
What is actually being saved in a Saved Game Object? is it just the value itself or is it the value of the “Object”? e.g an Int value of 100 or the 100 value of the player character(plugged into the saved object)
Base SaveGames won’t save objects or actors (or their inherited classes) themselves no matter what you do. Meaning you can’t just save an actor to save everything within the actor.
You’ll have to manually add every single value of an object that you want to save. Structs will be your best bet for saving varied sets of data without total chaos.
Through some decently advanced C++, you can save objects and actors, but that’s rarely ideal.
When you save something in an object, the values currently valid in that object are being said.
E g, if your object has a variable named Blorg, and something then calls “Set Blorg” with the value 42, and then that someone updates its own value to 17, the value 42 will still be saved for your object.