how to play music through script unity code example
Example 1: how to play sound in unity
public AudioSource Jump;
Jump.Play();
Example 2: play animation through script unity
animator.Play("StateName");
public AudioSource Jump;
Jump.Play();
animator.Play("StateName");