Load music only when everything is loaded

I am creating a game which has a lot to do with syncing to the music. Is there any way I can make sure that the music does not load earlier than the level or vice-versa.

Disable Play On Awake on the Music Audio Source and Create a script called “MusicOnSceneLoaded” on an empty game object with the following code.

using UnityEngine;
using UnityEngine.SceneManagement;

public class MusicOnSceneLoaded : MonoBehaviour
  public AudioSource music;
//Called when Script is loaded;
  void OnEnable()
music.playOnAwake = false;
//Plays the music when the scene is loaded.
SceneManager.sceneLoaded += PlayMusic;
   public void PlayMusic(Scene scene, LoadSceneMode mode)


Comment on this reply if it doesn’t work!