Things we need for sound

Multiple sounds

  • If we wanted to play different sounds from the same game object, we serialize it so that we attach it to our scripts
[SerializeField] AudioClip mainEngine;
AudioSource audioSource;
 
// in some function
audioSource.PlayOneShot(mainEngine);
  • Like this: