Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 T.Loughlin · Aug 07, 2012 at 08:35 PM · loadingmemoryresourcesasset bundles

AssetBundles, memory, and loading

Hello all, We are currently implementing the use of AssetBundles for some assets (like textures for UI, equippable items, etc) and a separate, dependent bundle for our scenes. There are a few problems related to this:

(1) It seems like we are running out of memory (because we are getting "Low memory" warnings, then everything starts shutting down). The issue is that before we started using asset bundles, everything was in the Resources folder and we didn't have blatant memory issues. These have been moved out and put into another folder that we bundle up and memory issues are now coming up. We are trying to figure out exactly what happens with memory with Resources folder as opposed to Asset Bundles. The main method for dling and using the bundles is to use LoadFromCacheOrDownload, keep a reference to the .assetBundle, then Dispose the www. Later, anything that called Resources.Load now calls assetBundle.Load. (2) In cases where we don't get a crash after loading a level and playing, we have an odd case where we have an enemy prefab that has a reference to another prefab (both being in the resource bundle). Problem is, the first run through that we get the bundle, the dependent prefab isn't loaded (it is null), even though the enemy loads fine. I've checked the editor.log, and the bundle builder is including both prefabs as expected. Oddly, if we close and reload the app, the cache loads the bundle instantly, then when we fight the enemy, it correctly has the dependent prefab loaded.

So, the questions are, what is loaded into RAM/heap space for the Resources Folder, and what is loaded into RAM/heap space for Asset Bundles? And also, what might cause a dependent prefab to not be loaded, especially on first run?

I've found this link http://forum.unity3d.com/threads/116340-memory-leak-when-using-assetbundles-on-iOS that helps a bit, but doesn't explain the difference with the Resources folder. And, it would be nice to know if he is correct in his assumptions.

Comment
Add comment · Show 1
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 NestorAlgieri · Apr 05, 2013 at 08:19 PM 0
Share

I'm also trying real hard to find a solution for this, converting from using resources to asset bundle or at least some how transfer the assets from the web to the disk all at app launch, then load form disk on demand... no solutions so far.

0 Replies

· Add your reply
  • Sort: 

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

9 People are following this question.

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

Related Questions

Long load time for scene... Some optimization questions. 1 Answer

Prevent Resources class from loading assets when application starts 1 Answer

Are the assets of referenced assets loaded into memory? 1 Answer

Estimate Assetbundle memory Size 0 Answers

Memory problem. How do I dump a Streaming Asset from memory? 1 Answer


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