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 Lou-adrien Fabre · Aug 12, 2014 at 03:10 PM · assetbundletreegraphdependencies

How to correctly set bundle build order when building resources tree.

Hello everybody, I am writing a question here after struggling quit a bit with the unity bundle feature, especially regarding the setting of relationship while building asset. I have been searching extensively about this topic but could not find any suitable answer to my problem... Sorry if I missed out something.

So I am trying to build an editor tool which will help the user building asset bundle from existing resources in the project. Especially, I need to be able to build dependencies as separate bundle for different reasons (I want to be able to load asset separately in memory, as well as download them separately, avoid duplication in case asset are cross references, etc...), I was planning to use the unity push and pop feature while building bundle (taking example of the documentation sample), but it seems I cannot achieve the desired result. Let me explain the problem with a simple example, here is a simplistic tree of asset dependencies :

alt text

Following the example, the only way I could build using only push/pop would be by following the procedure :

  • PUSH

  • Build 4-5-6-7

  • PUSH

  • Build 2-3

  • PUSH

  • Build 1

This is because 1 need to know 2 and 3 before being built, and 2 and 3 need to know 4-5-6-7 before being built. This procedure involves that non-existing dependencies are created, i.e for example 3 now depends on 4 and 5, which involves several restrictions which are almost un-acceptable for my tool :

  • Modifying 4 or 5 will force me to rebuild 3 and re download it from the client ->almost un-acceptable.

  • Modifying 4 or 5 will force me to load them first in memory before loading 3, even though they have no relationships (documentation says it's mandatory to load bundle dependencies first). -> Totally un-acceptable, as this example could extrapolate to more complex situation which could end up into having to load hundreds of unrelated asset before loading the desired one.

  • The list of asset that have to be push into dependency before building an asset is extremely dependent on the on setting of the dependence structure at build time. Anybody changing an asset structure will modify this list and therefore I cannot be sure of which assets need to be rebuilt after this modification. (i.e the list of asset dependent a specific one is totally "setting" dependent) -> Totally un-acceptable, as I cannot guaranty all previously built asset will still be functional.

As you see, this solution using only Push/Pop functionalities is not suitable for my case. It seem to me that they were created to be used in a setting where a lot of simple asset depend on only ONE shared asset, in a kind of "Pyramidal" fashion, which is not sufficient for any serious real-life case where dependencies can be multiple and intricate.

It seems for me that the solution would be to be able to provide a list of asset ids/asset references to the BuildBundle function directly, with having to use the Push/Pop, as they are quit restrictive tool that involves the previously mentioned issues, but I couldn't come across anythings like that while reading the documentation/examples. Or maybe I totally missed something / misunderstood something (which I would actually prefer), if so please enlighten me with the truth! Or of course if anybody came up with a more efficient "crafty" solution (mine is kinda experimental and based on building tree-leaf layer or single dependent together) and feel like sharing it, that would be more than welcome :)

Sorry for the long question and thanks for any help!

resource tree.png (2.2 kB)
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

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

2 People are following this question.

avatar image avatar image

Related Questions

Why does building bundles cause unload unused assets to be called? 1 Answer

How do you properly load Asset Bundles with dependencies? 3 Answers

Serialized scene information 0 Answers

Adapt a behavior tree graph structure to quest system 0 Answers

(Asset Bundle) Skip building dependency bundles when building a bundle. 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