void Update() { t += Time.deltaTime; if (t > time) { t -= time; Vector3 pos = Vector3.zero; pos.x = Random.Range(-range.x, range.x); pos.y = Random.Range(-range.y, range.y); pos.z = Random.Range(-range.z, range.z); GameObject newobj = MegaCopyObject.DeepCopy(spawnobj); newobj.transform.position = pos; MegaMorph mor = newobj.GetComponent <MegaMorph>(); if (mor) { mor.animtime = 0.0f; } } }
static void DeepCopyNew() { MegaCopyObject.DeepCopy(Selection.activeGameObject); }