void SpawnEnvironmentObject() { EnvironmentObject newEnvironmentObject = Instantiate(newEnvironmentObjectsRef[Random.Range(0, newEnvironmentObjectsRef.Count)], environmentContainer); newEnvironmentObject.SetPosition(new Vector3(Random.Range(0, maxBounds.x), Random.Range(0, maxBounds.y), Random.Range(0, maxBounds.z))); currentObjects.Add(newEnvironmentObject); }