Good morning. can someone help me I'm trying to do a random audio and synchronized animation but I'm not getting it. Any help is welcome.
- I know how to do with string and image, less with animation
Script I made with String
[Header("MinhasMusicas")]
//public AudioSource[] Track;
[Header("AutorDaMusica")]
//public string[] Meunome;
[Header("TextovaiAqui")]
//public Text Names;
private int Sound;
void ToqueMusica(int Numero)
{
Sound = Numero;
Names.text = Meunome[Numero];
Track[Numero].Play();
}
void Start(){ToqueMusica(Random.Range(0, Track.Length));}
void Update()
{
if (!Track[Sound].isPlaying)
{
ToqueMusica(Random.Range(0, Track.Length));
}
}
}