IEnumerator C_ChangingColor() { if (!EnableVectorLoop || ColorLoop.Length == 0) { SuperScript.ChangeColor_Random(StartDelay, SpeedChange); // Start the random color changing effect } else { do { for (int I = 0; I < ColorLoop.Length; I++) // Go through the vector and change to the next color { SuperScript.ChangeColor(0, ColorLoop[I], SpeedChange); yield return(null); yield return(new WaitForSeconds((1 / SpeedChange))); } yield return(null); }while(IsEnabled && !OneTimeVectorLoop); } yield return(null); }