unity how to remove clones code example
Example 1: delete all clones unity
var clones = GameObject.FindGameObjectsWithTag ("tag");
foreach (var clone in clones) {
Destroy(clone);
}
Example 2: how to destroy clones in unity c#
GameObject cardClone = Instantiate (Cards [i], new Vector3 (xVal, yVal, zVal), transform.rotation) as GameObject; Destroy(cardClone);