Hi,
I call load scene method in StartCoroutine().
ex)
StartCoroutine(LoadLevel());
And there is code what load asset bundle(WWW) in ‘LoadLevel()’.
Until now, I use below code for waiting WWW is ready.
foreach (WWW texData in coverTexData)
{
yield return texData;
}
But, below code is faster than upper code.
bool _isAllDone = false;
while (!_isAllDone)
{
_isAllDone = true;
foreach (WWW texData in coverTexData)
{
if (!texData.isDone) { _isAllDone = false; yield return null; }
}
}
if there is 40 'WWW’s in coverTexData(List), performance difference is 10 times.
why that difference is coming out?
‘yield return null’ VS ‘yield return WWW’
Thanks ![]()