IEnumerator not working

\I’ve been trying to use the Ienumerator for excuting and other stuff and it was doing fine, but when I use it only for the WaitForSeconds() it doesn’t work properly, why?

here’s a simple example:
“It’s supposed to print the time at first which would be zero then after two seconds it should print the time after two seconds which would be 2)”
but it prints 0 and 0… I don’t want to run the print command inside the IEnumerator I want it to work outside it, any thoughts ??
and thank you

using UnityEngine;
using System.Collections;

public class MoveTowards : MonoBehaviour {

	public GameObject target1,target2,target3;
	IEnumerator Go()
	{	
		
		yield return new WaitForSeconds(2f);
	}
	
	// Use this for initialization
	void Start () {

	print (Time.time);
	StartCoroutine_Auto(Go ());
	print (Time.time);
	
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		
		
		
	}
	

}

try

IEnumerator Start () {

print (Time.time);
yield return StartCoroutine_Auto(Go ());
print (Time.time);

}

  • if you want to wait for go couroutine to return then execute the second print statement