Best Practices
OMNI SAVE API USAGE BEST PRACTICES
Always call SaveAll() after
Save()to persistSet CurrentSlot before saving & loading
Use descriptive keys:
"playerHealth"not"h"Check with Has() before loading optional data
Use Global scope accordingly (only for cross-scene data)
Generate new GlobalIDs when duplicating objects: Validate Global IDs are not Duplicate.
Test migrations with backups enabled
Use async methods for better performance
NO-CODE OMNI SAVE BEST PRACTICES
Only Save Essential Data: Do not save random data on Saveable components without a reason. More Fields toggled = More Data to Save & Load. This Practice applies for both API & No-Code workflows in OmniSave.
API RELATED BAD PRACTICES
Forget SaveAll() = Data lost!
Duplicate GlobalIDs = Conflicts & weird behaviours!
Save every frame = Performance issues! Save on demand, eventually, or automatically every "x" seconds/minutes (Most of the times, around 5 to 10 minutes is a reasonable interval, but it highly depends on the type of game you are building )
Mix scopes incorrectly = Data not found!
Use Destroy() on Saveables that you want to persist... Use
DestroySelf()instead! ( For persistence )Store massive data = Use Addressables for large assets!
NO-CODE OMNI SAVE BAD PRACTICES
Select all Fields from all components on Saveables: Absolutely wrong and highly harmful. Narrow down the scope of the fields you save: Only Save Essential Data to lower Save Files Size, Save & Load Times, and overall Performance ( Despite running async, it´s still recommended to avoid these bad practices ). This applies for Saveable ( No-Code ) & API Workflows in OmniSave.
Last updated