Save Slots & Main Menu
Save Slot Management
Setting the Active Slot
// Always set the slot before saving & loading
SaveManager.SetCurrentSlot(1);Current Slot vs Last Player Slot
// CurrentSlot: Active this session (resets to 0 on game restart)
int current = SaveManager.CurrentSlot;
// LastPlayedSlot: Persists between sessions,
// useful for buttons that allow to Continue Last Game, for instance.
int lastPlayed = SaveManager.LastPlayedSlot;Reading Slot Metadata ( Simply for UI & Presentation )
using cowsins.OmniSave.UI;
// Get metadata without loading
SaveSlotData data = SaveSlotUtility.GetSaveSlotData(slotIndex: 1);
if (data.Exists)
{
Debug.Log($"Scene: {data.SceneName}");
Debug.Log($"Last played: {data.Timestamp}");
Debug.Log($"Version: {data.Version}");
// Show Continue button
}
else
{
// Show New Game button
}Checking if Save Exists
Last updated