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 /
  • Help Room /
avatar image
2
Question by Heino · Jan 13, 2016 at 12:03 PM · assetbundlescenesdependenciesbuildsettingsdependent

Asset Bundle dependcies when including scenes

I've been working on getting asset bundles up and running, which by now seems to work. I do have some questions about memory usage in the scenario we're implementing though.

The approach we're taking involves including all our gameplay scenes in an AssetBundle (possibly several), so that we can later change the scenes and then have them be updated through new AssetBundles. So what we do is to tag all the scenes as being part of an AssetBundle, then remove the scenes from the Build Settings list and load them from the bundle instead. All menu scenes, loader scenes, etc. will remain in the Build Settings and get included in the build. This seems to work just fine, but I'm worried about asset dependencies and multiple instances of various assets being generated.

First of all, removing all the scenes from the Build Settings also means that none of the stuff they reference will get included in the build - including engine code. We can get around this, even if it's a bit cumbersome, by making instances of the engine components we need in one of the scenes we do include in the Build Settings. It just doesn't seem elegant, but it's doable. We can of course also choose to not strip engine code in Player Settings, but we don't really want to do that.

Where it becomes troublesome is if we need to keep track of everything we use in these scenes, to make sure nothing ends up in multiple Asset Bundles. It's okay if we only use one Asset Bundle for all our scenes, in which case we "just" have to make sure nothing is used both in our in game scenes and menus. But if we want to split up our gameplay levels into several Asset Bundles, we'd risk getting a lot of dependency issues, since many of the scenes will reference the same assets. The documentation state that in order to avoid multiple instances of an asset when using Asset Bundles, you have to explicitly include that asset in an Asset Bundle. So in order to avoid duplicates, we'd have to make sure that all our assets are explicitly part of an Asset Bundle?

I hope my explanation makes sense and that someone can offer a little bit of insight to this issue.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Heino · Feb 15, 2016 at 03:09 PM

I'm taking the liberty of 'bumping' this issue, in hope of some replies. We want to be able to make changes to the game after launch with as little an impact on the user's end as possible. That means we'd like to break up our assets into as many asset bundles as possible. Ideally, one scene would mean one asset bundle, so that if we make changes to one scene, the user will not have to download all the other scenes. Problem is that if we put each scene in different asset bundles, each bundle will contain all the assets this scene needs too, which is of course very inefficient.

So I guess that means we'll have to manually put all the assets referenced in the scenes into asset bundles, but how do we figure out which assets to load for which scenes at runtime? I don't want to load in textures, meshes, materials, etc. that are not needed in a given scene, simply because it's referenced by some other scene. Isn't there some way to intelligently determine what assets are used and load them in when needed. Unity does this normally, deleting and loading resources as needed, but all this functionality seem to be missing with asset bundles?

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

38 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

Related Questions

Assigning Asset Bundle in Script 2 Answers

How do I build Scene Asset Bundles? 0 Answers

i am trying to create Android Asset Bundle but i am having the errors.Please help me out 2 Answers

Game doesnt start playing automatically after pressing restart. 0 Answers

Subscene isn't visible after hitting play! 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