hard-driveSave Slots & Main Menu

The provided Showcase Main Menu already provides UI & Slot Management, but below you´ll find full Documentation & API for Custom Implementations.

Save Slot Management

OmniSave supports save slots (profiles), so players can keep progress on different games without them overwriting each other. Each slot is entirely independent.

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 )

DO NOT load the entire game just to display menu info! Use SaveSlotUtility:

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