The underlying mechanism in 'yield return www' of Unity3D Game Engine
Posted
by
thyandrecardoso
on Game Development
See other posts from Game Development
or by thyandrecardoso
Published on 2012-11-14T11:11:10Z
Indexed on
2012/11/14
11:19 UTC
Read the original article
Hit count: 273
unity
In the Unity3D game engine, a common code sequence for getting remote data is this:
WWW www = new WWW("http://remote.com/data/location/with/texture.png");
yield return www;
What is the underlying mechanism here?
I know we use the yield mechanism in order to allow the next frame to be processed, while the download is being completed. But what is going on under the hood when we do the yield return www
?
What method is being called (if any, on the WWW class)? Is Unity using threads? Is the "upper" Unity layer getting hold of www instance and doing something?
© Game Development or respective owner