Hi, I am using Load assetBundle Example. The first loading, it runs ok. But when I load again then I got a error log from UnityEditor (but don’t have any crash and the game is continue) :
“nameSpace.stream
UnityEngine.WWW:get_assetBundle()
<>c__CompilerGenerated1:MoveNext() (at …/3DControl.cs:894)
[/Users/unity-build/Desktop/automatic-build-2/unity/Projects/…/Runtime/Serialize/PersistentManager.cpp line 825]”
And this is my code:
private IEnumerator f_LoadObject(string sURL, string sKey, LoadObjectReturn fReturn) {
m_currentWWW = new WWW(sURL);
yield return m_currentWWW;
if (m_currentWWW.error == null) {
AssetBundle m_assetBundle = m_currentWWW.assetBundle; // <==I got error at this line.
m_currentWWW = null;
if (m_assetBundle!=null) {
UnityEngine.Object go = m_assetBundle.mainAsset;
fReturn((GameObject)go, sKey);
} else
fReturn(null, sKey);
} else {
fReturn(null, sKey);
}
}
Can I fix this error?