I’m still about versioning stuff. Adding and removing properties seems to be handled nicely by the save system as only properties that match by name are loaded. But that causes issues when changing the datatype of a property. Lets say you have a
UPROPERTY(SaveGame)
FString ID;
and for what ever reason it changed to
UPROPERTY(SaveGame)
int32 ID;
That will definitly break as the name matches and the binary data is simply copied over the property memory, in the worst case reaching beyond the memory allocated for the new data type.
I for sure could give the int32 ID another name like int32 IDInt. However the old FString ID would need to further exist and should NEVER get removed. If it is removed and for what ever reason someone creates a float ID, old save files will break again.
Well, if we know that struct is going to get saved, we could make a comment above that FString ID that notes it should never get removed for save reasons. However if someone makes that edit that does not now that the struct is getting saved somewhere (could also happen by mistake), he will likely just remove the FString ID.
How are you handling an issue like that?