bugTroubleshooting

Issue
Solution

Data Not Persisting (API)

You likely Forgot to call SaveAll() Solution: Try to call SaveAll() after Save() Carefully take a look at Code Mode Documentation.

Can't Find Saved Value (API)

Common Cause 1: Wrong scope Solution: Match scope when saving and loading

// If you save using Global Scope:
SaveManager.Save("key", 100, PersistenceScope.Global);
// Load must use same scope, Global Scope in this case as well!
int key = SaveManager.Load("key", PersistenceScope.Global, 0);

Common Cause 2: Wrong scene Solution: Scene-scoped data only exists in that scene

Objects Respawn After Destruction

You likely used Destroy() instead of DestroySelf()

Solution:

GetComponent<Saveable>().DestroySelf();

Spawned Objects Don't Persist

You probably didn't use InstantiatePersistent()

Solution:

SaveManager.InstantiatePersistent("Prefabs/Item", pos, rot);

"CurrentSlot is 0" Warning

You didn't set slot before saving Solution:

SaveManager.SetCurrentSlot(1);
SaveManager.SaveAll(1);

Performance Drops During Save

This is lead by too much data or sync save. OmniSave offers async save, which is highly recommended.

Solution:

  • Use SaveAllAsync()

  • Reduce saved data

  • Enable compression

Character Controller teleports back on Loading: Position not persisting.

To save Player Controller´s position, there´s something tricky to take into consideration, specially if you´re using a Rigidbody or CharacterController based controller: Both of them contain an internal property that controls "position" on their own. This way, if only Save Position is enabled under Save Transforms in the AutoSave component, the RB or CC will force the controller to teleport back. How to fix?: Ensure position is marked for your CC or RB in the AutoSave component.

Last updated