1
DOTween & DOTween Pro / How to delete a gameobject after completion?
« on: March 22, 2016, 09:24:23 AM »
List<GameObject> mylist=GetMyList();
foreach(var item in mylist){
item.transform.DOMove (position, 2, false).OnComplete(()=>{Destroy(item.gameobject);})
}
This doesn't work. When items complete one by one, they will always delete the last item in the list.
foreach(var item in mylist){
item.transform.DOMove (position, 2, false).OnComplete(()=>{Destroy(item.gameobject);})
}
This doesn't work. When items complete one by one, they will always delete the last item in the list.