What does "yield return xxx;" mean? I know that "yield" means to delay the coroutine until the next frame and "return" means to get some value back, but what does it mean when they are used together?

I’ve learnt most of my scripting knowledge from internet so I don’t know much about the fundamentals of programming. A lot of the times I use “yield return null” at the end of coroutines because I fell that’s just something you do, but I don’t exactly know what “yield return xxx” means when they are used together (although I know what “yield” and “return” means when they are used alone).

So what does “yield return xxx” mean?

E.g.

IEnumerator LoadScene()
{
    async = Application.LoadLevelAsync(sceneName);
    async.allowSceneActivation = false;
 
    yield return async;
}

Why “yield return async” and not just “yield return null”??
Much thanks!

http://docs.unity3d.com/412/Documentation/ScriptReference/index.Coroutines_26_Yield.html

That gives you a high level overview of the mechanic, but it has to do with the IEnumerator return type. This makes the function act like a collection when the unity engine “iterates” over it. yield allows it to return a series of values (waits usually) without trashing the function scope each time.