Had difficulties implementing intro to Coroutines from unitypatterns.com. Help?

I can’t figure out the cause of the problem. I’ve tried restarting Unity and rebooting my PC. I’ve tried passing string and method names. Switching 0 to null made no difference. Nothing ever changes. I’m always consistently getting either 1 Hello when yield comes before Debug.Log, and 2 Hellos when yield comes after. Any ideas??? I literally only put this online to ask this question here. I really think I need to have Coroutines work properly, I don’t know what the source of the problem is.

Gist with syntax highlighting: Had difficulties implementing Coroutines per this site http://unitypatterns.com/introduction-to-coroutines/ I can't figure out the cause of the problem. I've tried restarting Unity and rebooting my PC. I've tried passing string and method names. Nothing ever changes. I'm always consistently getting either 1 Hello when yield comes before Debug.Log, and 2 Hellos when yield comes after. Any ideas??? I literally only put this online to ask this question here. I really think I need to have Coroutines work properly, I don't know what the source of the problem is. · GitHub

Github entire but simple project: GitHub - nastajus/CoroutinesLearning: Had difficulties implementing Coroutines per this site http://unitypatterns.com/introduction-to-coroutines/

Unity Patterns tutorial: http://unitypatterns.com/introduction-to-coroutines/

The most interesting result was when I append i to the output it prints 5 times instead. Very weird and confusing based off the tutorial.

	void Start(){
		StartCoroutine("SayHello5Times");	//doesn't work right
	}

	IEnumerator SayHello5Times(){
		for (int i = 0; i < 5; i++){
 
			//instructions: comment out other block
 
			yield return 0;
			Debug.Log("Hello");			//prints once
			//Debug.Log("Hello " + i);	//prints 5 times
		}
	}

The good news is your code works perfectly, the bad news is you’re about to kick yourself. (I think anyway)

In the console you have an option to “Collapse” repeated items. I’m guessing you’ve got that on so only seeing repeated “Hello”'s only once though they have a counter on the right as to the number of times they’ve appeared. With the other lines with the appended i’s as the comments are unique they’re individually listed.