I have 3 object from the same prefab. I run animation of these object by call SetTrigger . But the animation is not occured in the same time.
I want to animate object to dissapear in the same time.
private void Destoy(List<Item> dupList)
{
foreach (Item dup in dupList)
{
dup.color.anim.SetTrigger("Destroy");
Destroy(dup.color, 1);
}
color.anim.SetTrigger("Destroy");
Destroy(color,1);
}
When SetTrigger call , animation was not run at the same time. Remark : this Destroy function is called from coroutine.
see detail in this picture.