An Example for rolling dice, I got a random number using the Random.Range(1, 7) function. I play the corresponding random number animation of the dice. Here is my question. I need to pause the execution of the script while the animation is being played and then continue with the script once the animation stops. Here is a sample script.
var DiceAnim = new Array("Dice1","Dice2","Dice3","Dice4","Dice5","Dice6")
var RandomDiceNumber = Random.Range(1, 7);
GameObject.Find("Dice").animation.Play(DiceAnim[RandomDiceNumber]);
// The next part of the script has to play once the animation stops. How can I do it.
PlayerCoinMovement();