Something like this:
Remember, when you create a Save Game Object it starts with the (default) variables/values you set in your SaveGame class. You then need to change those variables in the object itself, before saving in order to be able to load those values later.
So in my example, when the map starts it creates the object, and checks if the save game exists. If so, it loads from slot, casts to the SaveGame class, sets it to the BP_Save_Ref variable (so you can access it later), then pulls the sunLightPos variable from the loaded save game reference.
If there isn’t a saved game in the slot, it simply saves one with the default values from your SaveGame class. Assuming the map default for the sun’s rotation is the same as the default in the SaveGame class, nothing more needs to be done.
Now, when you leave the map or need to save the game, you reference the BP_Save_Ref (Save Game Object) and set the sunLightPos variable to the current rotation, then save the game to slot using that same BP_Save_Ref reference. I think this is the piece that you’ve been missing, which is why when you reload, it isn’t changing from the default value.
Does this make sense?
It is helpful to create individual functions for saving and loading, so those actions can be easily called.
