Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Szzwp · Dec 15, 2016 at 03:19 AM · assetbundlefreezefreezingassetbundle.loadasync

AssetBundle.LoadAssetAsync case freezing in Unity5.5.0p1

When called AssetBundle.LoadAssetAsync many times in the same time will case editor freezing. (android is the same problem)

Like this:
AssetBundle ab = xxx;
AssetBundleRequest req1 = ab.LoadAssetAsync("a1", typeof(GameObject))
AssetBundleRequest req2 = ab.LoadAssetAsync("a2", typeof(GameObject))
AssetBundleRequest req3 = ab.LoadAssetAsync("a3", typeof(GameObject))

Called many times in the same time, and then case freezing.
If called from coroutine one by one will ok.

Is anyone has this problem?
My project is upgrade from unity5.4.3 to unity5.5.0f1(or 5.5.0p1)

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image hanmar · Dec 15, 2016 at 08:28 PM 0
Share

I have same problem. in same case. I upgrade my project from 5.4.3 to 5.5.0

I think you may write this to issue tracker

avatar image ASPePeX · Dec 21, 2016 at 03:05 PM 0
Share

There is an issue that sounds like this: https://issuetracker.unity3d.com/issues/loading-multiple-bundles-using-assetbundle-dot-loadassetasync-freezes-editor

5 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by watsonsong · Dec 20, 2016 at 12:42 AM

I met the same problem, both freeze on android and editor. I queue the load action to resolve this problem. But I think it should be a bug, have find a better way to deal with it?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Geometrical · Dec 20, 2016 at 12:53 AM

Firstly, the AssetBundle.LoadAssetAsync function is only available in Unity Pro. Are you using Unity Pro?

Secondly, have you tried the non-asynchronous AssetBundle.Load function?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by smflt · Dec 21, 2016 at 02:14 PM

I met the same problem too 5.5.0p2. you should use LoadAsset

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by anton-melegov · Dec 29, 2016 at 07:36 AM

I have freeze on this lines:

 yield return SceneManager.LoadSceneAsync(sceneName);
 assetBundle.Unload (false);

if I comment unload line everything seems ok for me (apart from memory leaks). Issue reproduces if asset bundles didn't cache yet and also appears in older versions of unity. Please keep me in touch if you will found a solution

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by CoSpinu · Sep 26, 2017 at 08:57 AM

hello guys( @anton-melegov , @Szzwp , @watsonsong ), we encountered something similar, and for us it worked the fallowing workaround:

 AssetBundleCreateRequest request = AssetBundle.LoadFromFileAsync(Application.streamingAssetsPath + assetBundle);
 yield return request; // wait for the asset bundle to load;
 AssetBundle tempAB = request.assetBundle;
 AssetBundleRequest abr = temp.LoadAllAssetsAsync();
 yield return abr; // wait for all assets to be loaded in ram and video ram
 myassetBundle = tempAB;
 
 // now you can load any resources you want
 myassetBundle.LoadAssetAsync(path);

the trick is to wait for all the resources to be loaded (async so no major freeze will be encountered) and all the loadassetAsync will return most probably with the asset already loaded, so it will be done before the next loadassetasync will be called. We didn't had a lot of time to test exactly what it's happening, but we haven't encountered any other freeze after we implemented this. I hope it helps someone :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

69 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to import the object from server to unity 2 Answers

Android APK freezes during level load but not in Unity Editor 2 Answers

AssetBundleManager.LoadAssetAsync() doesn't work on some android devices (or is very slow) 2 Answers

how to log for a build game freeze error 0 Answers

Assign www.assetBundle to new AssetBundle Freezes WebPlayer 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges