I’m a beginner trying to make a basic platformer game and can’t find any good tutorials on this subject, any tips?
[SerializeField] AudioClip DeathSound;
[SerializeField] [Range(0, 1)] float DeathSoundVolume = 1;
private void OnTriggerEnter2D(Collider2D collision)
{
AudioSource.PlayClipAtPoint(DeathSound,Camera.main.transform.position, DeathSoundVolume);
}
Do you want music that will play as long as the game continues, or you want instant music that will play when an object is destroyed? If you can give a little more detail, I can help you better.