- Home /
Question by
J Lam · Jul 16, 2012 at 01:12 PM ·
androidloadlevelasync
LoadLevelAsync problem in Android with Unity 3.5.2
We have been using Application.LoadLevelAsync in our games for a long time without any problems in 3.4 version. However, we have upgrade the Unity to 3.5.2 recently and started to have weird problem.
We have the same scenes setup across games: 1. Title Scene 2. Loading Scene 3. Game Scene
While we call the following function to load the Game scene from Loading Scene, the game hanged and not able to proceed.
public IEnumerator StartLoading(string targetScene) {
Application.backgroundLoadingPriority = ThreadPriority.Low;
AsyncOperation async = Application.LoadLevelAsync (targetScene);
yield return async;
}
the adb log keeps on showing this:
07-15 20:11:08.710: E/Unity(14540): (Filename: ./PlatformDependent/AndroidPlayer/ZipFile.cpp Line: 234) 07-15 20:11:08.710: E/Unity(14540): Inflate Error: invalid literal/length code
This is not 100% able to reproduce, it happens 1-2 times out of 10.
Does anybody know whats the problem ? Thanks!
Comment