- Home /
StartCoroutine important for using yield?
Hello, I'm new to unity and have seen many tutorials saying "once you use yield in a function you have to use `StartCoroutine(functionName());`". So i did the following,
I made a coroutine.
Then I used StartCoroutne();.
It worked.
Then just for the search of my answer,
I made another coroutine.
Without using StartCoroutine(); I just made a simple call to the function.
It worked.
So my question here is, What exactly is the use of StartCoroutine();?
Answer by fafase · Aug 26, 2012 at 01:44 PM
In UnityScript, StartCoroutine is not necessary as the compiler does for you. You can call a coroutine involving a yield without StartCoroutine().
StartCoroutine is used with C#
Oh thanks, I was watching C# tutorials and converting them to javascript so this confused me