"1 Integration Introduction" scene change trouble

Hi,

I loaded the project from the given commit (only one search result for 1 Integration Introduction) and imported this lesson’s package, and every time I change scene from A to B, it gives a bunch of not at all helpful spam (A bunch of shader warnings, saving notifications, and notifications that the player controller’s been destroyed) and swaps between the scenes a couple of times before loading B. When I try to go back to scene A, it flips between the scenes a bunch of times before sticking me in the middle of nowhere.

Here is what I am experiencing. https://youtu.be/keekk72XWVs

In the video I play, demonstrate the controller is working, move into the transition area, and show off my problem. Then after the transition fails (that doesn’t usually happen!) I stop and re-play the game and now I am on the screen I want to be on, and have trouble leaving, getting stuck once the game puts me in the middle of nowhere.

This appears to be an issue tied to the saving system. I believe it’s addressed in another lecture “Saving System Bug”, but that’s not until later in the series, and let’s get this fixed now…

The issue stems from a change that was made to the Load() method in the SavingWrapper that was an attempt to fix another issue, where pressing the L key to Load didn’t bring dead characters back to life. The solution for that problem is to reload the last scene, but we also were using Load() for the Portal, and that created a significant issue.

Go into the SavingWrapper.cs and look for the Load() method.
Change the contents to

public void Load()
{
    GetComponent<SavingSystem>().Load(defaultSaveFile);
}

Now go into the Update method and change the contents of if(Input.GetKeyDown.KeyCode.L))

if(Input.GetKeyDown.KeyCode.L))
{
    StartCoroutine(LoadLastScene());
}
1 Like

Privacy & Terms