void SpawnLines() { for (int i = 0; i <= numLines; i++) { BackgroundLine newLine = Instantiate(line); newLine.SetValues(scrollSpeed, a, b, lineWidth); newLine.transform.position = new Vector3(0, i * ResolutionCompensation.WorldUnitsInCamera.y / numLines, -1); lines.Add(newLine); } }
void OnEnable() { myScript = (BackgroundLine)target; }