// Use this for initialization void Awake() { S = this; foreach (GameObject obj in ObjectsToReset) { OriginalPositions.Add(obj.transform.position); } }
// Use this for initialization void Awake() { S = this; ObjectsToReset = GameObject.FindGameObjectsWithTag("AsteroidBreakable"); foreach (GameObject obj in ObjectsToReset) { OriginalPositions.Add(obj.transform.position); OriginalScales.Add(obj.transform.localScale); } }