Hi!
I've been trying to set up the basics for saving in my game. Whenever a scene is loaded an autosave is made and when the game is started it loads from the autosave slot if an autosave exists. I also have a function for starting a new game, which first removes the current autosave and then starts a new game.
Everything works as it should in both Desktop and Android but with iOS there seem to be some kind of issue. An autosave isn't made and when I try to start a new game it just freezes.
I am running the latest AC (currently 1.78.2) and Unity 2022.3.1f1
See log details below.
Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
This is the error message i get whenever a scene is loaded (and when I suspect the autosave attempt is made):
InvalidOperationException: AC.SceneItemSpawnData cannot be serialized because it does not have a parameterless constructor. Rethrow as InvalidOperationException: Cannot serialize member 'AC.SingleLevelData.allSceneItemSpawnData' of type 'System.Collections.Generic.List1[[AC.SceneItemSpawnData, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]', see inner exception for more details.And this is the error message I get when I try to start a new game after first deleting the autosave:
`ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Welcome to the community, @christianj.
This is a known issue and a fix is set to be included in the upcoming v1.78.3 update. My apologies for the hassle.
In the meantime, you should be able to work around this by opening AC's LevelStorage script, and adding the following to the top of its UnloadSceneItemSpawnData function (around line 779):
I'd like to double-check this. Could you share the full message - stacktrace included?
Thanks a lot! Great to have it resolved and happy to hear it will be fixed!
Here's the full message:
https://imgur.com/RUPQvsO
Everything works fine now with the latest v1.78.3 update! Thanks!