After completing the course I cannot load scene

Once, I Introduce Savable . the game still saves and still created a file. However, I can no longer load that file Using L? Any suggestions? only my enemies are showing as returning to restore state in my debug

Are there any messages in the console?

What happens when you quit the game and press play? Does the game reload correctly?

when i hit save, this is my console output window.

.
I have no issues loading the game after hitting play but I cannot load my save .

So this is likely a known issue with things like animators not getting reset after a L)oad. This is because we’re not loading from a “pristine” state, but rather a muddy one where some of the changes aren’t easily reversed. One could create corner cases and special things like resetting the animator if the character was dead but isn’t now, etc, but this would be a never ending issue for the L key which is really just a glorified testing tool to begin with. Let’s set things up so that the scene is in a starting state after pressing L

Go into SavingWrapper.cs and find the Update method.
Change the contents of the if(Input.GetKeyDown(KeyCode.L)) from Load() to

StartCoroutine(LoadLastScene());

This will ensure that the scene is reset before restoring the state.

do i need to implement the method:

Oh, you’re not as far along as I thought you were. Make this change after Sam introduces the method in a few more lectures.

ok ill continue forward and see if it gets fixed as we go. Thanks

Privacy & Terms