Multiplayer icon indicating copy to clipboard operation
Multiplayer copied to clipboard

Create PauseLockSession during PostLoadInit in ExposeData

Open SokyranTheDragon opened this issue 1 year ago • 0 comments

Normally, calling UniqueIDsManager.GetNextID gives a warning when that happens, which made me realize that it's potentially unsafe to do so - the IDs may have not been loaded at that point. This should not happen when saving the data, as the session should exist at that point.

The solution here is to only create the session when Scribe.mode is LoadSaveMode.PostLoadInit. This ensures the IDs are initialized and getting the next ID won't cause any issues.

SokyranTheDragon avatar Aug 16 '24 16:08 SokyranTheDragon