- Home /
Question by
Rilissimo · May 12, 2015 at 09:42 AM ·
savegameoverwriteunityserializer
Unity Serializer Overwrite savegame
hi there! i'm working on a save menu with unity serializer, but i need a help! i want to overwrite a gamesave with click on SaveGame if there is 1 save, but for now i have done only a button for delete savegame, there is the code, i want the possibility to overwrite the unique savegame by clicking on Save Game button!
if(GUI.Button(Rect(800,310,430,70), "Save Game"))
{
LevelSerializer.MaxGames = 1;
LevelSerializer.SaveGame(gameName);
}
for(var sg in LevelSerializer.SavedGames[LevelSerializer.PlayerName]) {
if(GUI.Button(Rect(800,410,430,70), sg.Caption)) {
LevelSerializer.LoadNow(sg.Data);
}
}
for(var sg in LevelSerializer.SavedGames[LevelSerializer.PlayerName]){
if(GUI.Button(Rect(800,510,430,70), "Delete: " + sg.Caption)){
sg.Delete();
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613195340im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Serialization issue with multiple SaveGames iOS - Unity Serializer [SOLVED] 1 Answer
Downloaded Asset overwrites another asset. 0 Answers
database for player accounts / Online Savedata 1 Answer
Saving data on iPhone 1 Answer
How to Load and Save individual gameobjects with unitySerializer. 0 Answers