I don’t use StartCoroutine with strings; I never found stopping them with StopCoroutine predictable enough to use. You don’t need gameObject. before your guiTexture.
void Update () {
if (condition) {
StartCoroutine(UpdateArrowRotation());
condition = false;
}
}
IEnumerator UpdateArrowRotation () {
for (int i = 0; i < ArrowRotation.Count; i++) {
Debug.Log("Check");
yield return StartCoroutine(TimeBetweenArrowChanges());
guiTexture.texture = ArrowRotation[i];
}
}
IEnumerator TimeBetweenArrowChanges() {
Debug.Log("TIME - ");
yield return new WaitForSeconds(2F);
Debug.Log("2 Seconds");
}
Honestly, I don’t know exactly what you’re trying to do; to me, it looks like you just piled on unnecessary complexity. Here’s my best guess at what you actually want:
IEnumerator Start () {
int i = 0;
WaitForSeconds wait = new WaitForSeconds(2);
while (true) {
guiTexture.texture = ArrowRotation[i];
i = i == ArrowRotation.Count - 1 ? 0 : i + 1;
yield return wait;
}
}
I didn’t in any way suggest not using yield. But I do suggest that having two levels of coroutine is unnecessary. I’m not willing to help anymore unless you tell us how the last code example I gave you isn’t the right solution for you.