Music Player in Unity 5.5

I’ve been running through the course with Unity 5.5. A lot of the level management functions have been replaced with the SceneManager functionality. Andreas has already posted a solution for the Level Manager script, so I won’t cover that here. This resolves the “OnLevelWasLoaded” function which has been deprecated in 5.5. The Music Player uses it to detect a change of level and play appropriate music. I’ve updated the function so that it uses the new SceneManager structure. Handily it’s also simplified the code a little as there’s no need for a Start function now. Code below:

1 Like

Privacy & Terms