- Home /
Question by
Whipinsnapper · Apr 05, 2016 at 05:35 AM ·
c#scorescene-switching
How to recognize if the scene has changed in C#?
So, I'm working on a game where it will go through different scenes (levels.) So, instead of making a separate script for a set score for each and every scene, I want to make a script that recognizes which scene it is currently, so that it can change the value of the score accordingly. Is there a way for me to do that in C#? Thanks.
Comment
Answer by Happy-Zomby · Apr 05, 2016 at 06:18 AM
Hi, you can use the scene manager see here http://docs.unity3d.com/ScriptReference/SceneManagement.SceneManager.html if not I believe this is what you are looking for: http://answers.unity3d.com/questions/1109497/unity-53-how-to-load-current-level.html