Exit level no longer triggering

After doing the game session controller lesson nothing happens when I touch the level exit sprite box. I updated the any changes to the exit prefab but my player still won’t collide with the exit anymore. Exit is set as the trigger. I replaced my script changes with the instructors from the project changes. I have no overrides that haven’t been refreshed. Game session prefab is on all my levels. Scripts match the instructors. Any idea what I’m missing? My restart level on exit worked fine before going through this part of the lesson.

Hi,

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture?

Since C# is case-sensitive, the correct spelling is crucial. Typical mistakes are, for example, onCollisionEnter2D or OnCollisionEnter2d and so on. Some typos are very hard to see, so double-check the spelling.

Have you already tried to add Debug.Logs to your code to see what is going on during runtime? There is a chance that your method does get executed but the next level won’t get loaded for some reason. Figure out what works and what does not work. Otherwise, you might end up looking for errors in the wrong place.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms