Events System
Events
using cowsins.OmniSave.Runtime.Core;
SaveService.OnSaveStarted += OnSaveStarted;
SaveService.OnSaveProgress += OnSaveProgress;
SaveService.OnSaveCompleted += OnSaveCompleted;
SaveService.OnLoadStarted += OnLoadStarted;
SaveService.OnLoadProgress += OnLoadProgress;
SaveService.OnLoadCompleted += OnLoadCompleted;Events Architecture
void OnSaveStarted(int slotIndex) { }
void OnSaveProgress(int slotIndex, float progress) { } // 0f to 1f
void OnSaveCompleted(int slotIndex, bool success) { }
void OnLoadStarted(int slotIndex) { }
void OnLoadProgress(int slotIndex, float progress) { } // 0f to 1f
void OnLoadCompleted(int slotIndex, bool success) { }Practical Example: Loading Bar
Saveable Component Events
Last updated