AssetBundle.LoadAssetAsync is about 4 times slower on android than on ios devices
Hi, All! It's incredible! Anyone can help me out?
The test results for the same assetBundle: result: iphone6 5 seconds iphoneSE 5 seconds ipad Air2 5 seconds Galaxy Note7 20 seconds (Android 6.0.1,Snapdragon 820,4GB RAM)
unity version: 5.4.0f3 AssetBundle size: 17.3mb.
Below is the code of loadAsset.
WWW www = WWW.LoadFromCacheOrDownload(url,version);
yield return www;
if (www.isDone)
{
bundle = www.assetBundle;
NGUIDebug.Log("WWWFinishTime:"+Time.time);
AssetBundleRequest request = bundle.LoadAssetAsync(name, typeof(GameObject));
yield return request;
NGUIDebug.Log("ABLoadFinishTime:" + Time.time);
GameObject obj= Instantiate(request.asset as GameObject);
}
And the create assetBundle code:
[MenuItem("AssetBundle/Build AssetBundles -IOS")]
static void BuildAllAssetBundlesIOS()
{
BuildPipeline.BuildAssetBundles("Assets/AssetBundles/ios", BuildAssetBundleOptions.None, BuildTarget.iOS);
}
[MenuItem("AssetBundle/Build AssetBundles -Android")]
static void BuildAllAssetBundlesAndroid()
{
BuildPipeline.BuildAssetBundles("Assets/AssetBundles/android", BuildAssetBundleOptions.None, BuildTarget.Android);
}
Answer by yokewang · Oct 10, 2016 at 09:44 AM
After a few days of testing,this is my test result of time consuming(second) for each step
mi5: Android 6.0.1,Snapdragon 820,4GB RAM
Note7: Android 6.0.1,Snapdragon 820,4GB RAM
iphoneSE: IOS9.3.5, A9, 2GB RAM
I thought perhaps the poor note7 was just Underclocking. I would like to know the reason of the difference performance of AssetBundle.LoadAssetAsync between ios and android.