*hi guys!
my character has got tow “Idle” animationclip.
one of them is the main an other one should play randomly!
My own script looks correct(i hope)! but my Unity immediately crash when i use it!
void Idle()
{
while (Standing)
{
if (Random.Range(0,10) > 1)
StartCoroutine(Idle1());
else
StartCoroutine(Idle2());
}
}
Finaly i could solve it!
The reason was that “yeild” actually shouldn’t use in Update or FixUpdate,
the correct script is :
(I’ll put it here .for someone who has got the same problme as me! (; )