Save game specific variables not saving

Using UE 5.1.0 and using save game nodes work fine with variables such as bools, integers, floats etc. but not with gameplay ability references or widget references.

Here is my save game info…

When i stop the editor and go back in the string value stays but the other 2 variables are gone. Now if i don’t exit the editor and use this:

it works fine…until i exit and come back into the editor…

I’m pretty sure you can’t save references.

A reference is basically a pointer in memory, and the arrangement of memory is always different.

hello, it is very likely that the references of “gameplay ability” and widgets are different when you leave the editor.

when you come back to the game, these references don’t exist anymore, or exist, but on a different memory address than in the previous game.

therefore you should not store the references directly but rather the variables needed to recreate your object with the same state as the one saved.

in the case of the “Gameplay Ability”, try to store a class in order to find the corresponding object

1 Like

Ah Thank you for that information. At least now i know what is happening now. Yea i’m trying to save the exact gameplay ability in the exact same hot bar slot i’m dropping it into so when i come back into the game its already on my hotbar. I see what you are saying about the gameplay ability and I think i can get that to work with no issue…but trying to get it to load back into the exact same widget hotbar slot will be quite the challenge it seems…well for me at least.

Saving a class for the gameplay ability worked!! Thanks!

2 Likes