I have AC Main menu scene with AC gui menu that has a button that starts a new game with an action Engine: End game Restart game Number 1 scene. Since it resets the game.
http://s14.postimg.org/83tg8xys1/Capture.jpg I do autosave right before I change the level in each scene. Starting after the Main menu scene.
http://s11.postimg.org/3wjlyuzgz/Capture.jpghttp://s11.postimg.org/9fm5g2wib/Capture.jpg It looks like autosave stops saving after the first autosave, but changes the autosave picture accordingly. So it keeps loading the first autosave it did.
If I don't run that Engine: End game action with Restart game in my Main menu level, then autosave works with no problem. So it looks like there might be a conflict with it.
Other things that might help:
Does the "File written" line in the Console appear as it should do
when autosaving incorrectly? 2 lines of File writen lines appear once in both cases with 2 PlayerPrefs Key lines. Either with Engine: End game Restart game executed previously in the Main menu or with out it. And never again.
http://s12.postimg.org/ws1w3joct/Capture.jpgDoes the timestamp of the file it
references change? Yes it does. All the time when you save. But the size of the file is still the same.
Does it work if you manually delete the old autosave
first? No, I delete the autosave file but it keeps writing one and still loads the wrong the very first autosave but has the correct autosave picture.
My settings:
http://s17.postimg.org/sv3wnbbvz/Capture.jpghttp://s10.postimg.org/i78nmrjgp/Capture.jpgAlso, I just noticed that this bug goes not only to autosave, but to all saves you I make if I have that Engine: End game action with Restart game in my Main menu level.
Using Unity 5.2.4f1 AC 1.50b
Thank you for looking into it.
Comments
A bizarre issue. How is the save file wrong, exactly? In every way, or partially (e.g. current scene, player position, inventory items carried, variable states)? What platform are you building to?
If you open up ActionEndGame.cs, the reset code is from lines 68 - 77. The only reference to save games is made on line 70. If you comment it out, what happens?
As an aside: I really wouldn't recommend Autosaving at the end of a scene. AC doesn't save the state of Cutscenes (which is why Autosaving occurs when one is finished), so loading the save file won't cause the next scene to trigger - you'll be back to the previous scene. Despite your "glitch" problem that occurs in the next scene due to the texture overlay, I strongly suggest you move back to saving at the start of the next scene.
I'm telling you this Engine: End game action with Restart game messes it all up. I'm quite positive about it.
It loads exactly what it did once. Building for Win. But I ran it in the editor too, same result.
I'm serious, this is driving me nuts.
I also tried to autosave it at the start of the level the same problem.
Tried to comment out line 70, exact same thing happens...
I'm going to assume that commenting one of those lines out is going to stop it from happening. If you can find out which one, we'll be closer to sorting it out.
In the another clean test project with bare things in it, it is somehow working now, let me investigate into it.
All I had to do is to remove Character Player from Character Settings in Manager's settings.
In order autosave and any save/load make work correctly with Engine: End game Restart Game executed prior. SInce it's the only non-script way to reset a game to play it over.
Would be also nice to have in the future Engine: End Game Reset scene that you could select which scene to select and continue action after.
Thanks for your help.