Hi Pan,
Before we start, it’s much easier if you copy/paste your code into your posts and then just apply the code formatting characters (see the link at the end of my reply), by doing so, you allow those who help you to more easily read your code and they can also copy/paste chunks of it back in a response if they have any suggestions, without perhaps having to type it all out. Screenshots are very useful however for errors messages within Unity or details from the Unity editor itself, perhaps Inspector details for example.
Ok so the problem in hand.
It looks like you’ve replaced the obsolete code with a suitable replacement. You are of course missing the checks for the additional levels, so at the moment you would only have the startClip playing.
You’re not currently calling music.Stop()
or music.Play()
or setting music.Loop = true
either, other than in the Awake
method. I would add a check around this too, for example;
if(music.isPlaying)
{
music.Stop();
}
That way, should it not be for any reason, it won’t error and fall over.
Let me know if you are still having any problems.