How to compare game save data?

When a player is about to exit the game and wants to be prompted whether to exit without saving, how can I compare the similarities and differences between the game progress and the game save on the disk at this time?

I stored the temporary saveData on the gameInstance. In the blueprint, I directly compared whether they were equal and concluded that they were not equal. Maybe this method should not be used for comparison.


I attempted to compare the specific variables in saveData, and the results were equal. Therefore, the comparison nodes in the blueprint are estimated to directly compare two specific instances, which is of course not equal. However, the contents in these two instances are actually equal.
2025-05-06 162253

Therefore, is there a way to have a better comparison method for this situation? Because if there are more and more variables in the game save later, comparing these variables one by one is estimated to become troublesome.

1 Like

There’s no identity operator for structs ( in blueprint ). Also here, it looks like you’re comparing references? ( from the color ).

You might try converting to an array and then using identity?

Otherwise, you might need to write some code to compare them :wink:

1 Like

I roughly understand. So is it necessary to nest another layer of structure to wrap the data that is to be stored?

1 Like

No, it’s a conversion, but I think it does the trick :slight_smile: