Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Asset Bundle Improvements

Discussion in 'General Discussion' started by Erik-Juhl, Mar 10, 2016.

  1. Erik-Juhl

    Erik-Juhl

    Unity Technologies

    Joined:
    Jul 11, 2012
    Posts:
    59
    Hello!

    As you have probably seen in other threads, we like to check in on the direction we are taking with our technology to make sure we are best serving you. In this thread we would like to discuss the direction of Asset Bundles with you. Instead of restating the long term roadmap and short term projects I’d rather just step back and listen to what you all have experienced and what you all are needing. Knowing a bit about you also helps us better understand your feedback so please consider the following questions to get this discussion going.


    Who are you?

    What kind of game are you trying to build or would like to build?

    How do Asset Bundles fit into that? What use-cases do you have?

    What are the GOOD things about Asset Bundles that you like?

    What are the BAD things about Asset Bundles that you dislike?

    How can we make it BETTER?



    Thanks!
    Erik
     
    Ony, TimCabbage and jakovd like this.
  2. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    Small indie currently making 2d puzzle/word/trivia games but previously made a couple of games for BBC's Top Gear.

    A current game in development needs to download textures as we don't want to include them in the build as there are a lot (1000s). I've looked at the pros/cons of using assetbundles (vs other methods).

    Pros:
    1. Good download size.
    2. Can use compressed textures (low memory usage on device).

    Cons:
    1. Have to build for both iOS and Android.
    2. Have to build again for each Unity version and keep all hosted to cater for people on different versions of app.
    3. All textures must exist in a Unity project (long wait any time a reimport is required, e.g. Unity update, textures modified).
    4. Will take a long time to build assetbundles (textures will be compressed again).
     
    ilmario and hopeful like this.
  3. Lee7

    Lee7

    Joined:
    Feb 11, 2014
    Posts:
    137
    Are Asset Bundles extractable allowing the contents to be modified and then repacked?

    Thats the only thing that would make them useful for me. Unity games have really crappy mod support because of propriety file formats and no tools to work with them.
     
    Player7 likes this.
  4. jakovd

    jakovd

    Joined:
    Mar 9, 2010
    Posts:
    15
    Here is the feedback from Labster's development team.
    We are creating laboratory simulations to give students an immersive learning environment.
    We pack a lot of assets for each lab simulation in asset bundles containing either sets of assets or scenes.
    We actually use XML definitions of the whole simulation and assemble it by downloading necessary assets.
    Default look of the room comes from scene bundle with some assets already on exact position.
    Other assets come as asset collection which we then pick out from on demand and place assets on correct position.

    We hack around many restrictions that you made for new asset building system.
    We simply don't use asset bundles in the way you imagined it.
    For example, we need to have some assets in more than one asset bundle.
    So we can't keep assigning asset bundles in Editor - we can't assigning more than one that way.
    We're using BuildPipeline.BuildAssetBundles to build asset bundles with AssetBundleBuild configurations.
    But we can't put all the configurations at once because the system won't build if it finds an asset in more than one bundle. Instead, we call that BuildAssetBundles method many times with different single AssetBundleBuild configurations to avoid that issue. That way we get valid .manifest file for that single asset bundle but .manifest for the whole set of bundles is unusable. It gets overwritten each time.
    We tend to move built asset bundles around when the build is complete, so it would be nice to have the output location as an option in AssetBundleBuild.
    We're assigning asset bundles with our names of the simulations. Our names are case sensitive so we need to rename asset bundles again since they come out lower cased. And what happened to .unity extension? We have to add that again since our loading system was designed to use that extension.
    You see, we have a lot of post processing in our code base to get the wanted results. We could do without those.
    We're building bundles for multiple supported platforms. It takes a lot of time to build them all.
    We think it would be great if you could specify platform in the AssetBundleBuild. See if BuildPipeline could be optimized to only switch required assets for that platform instead of changing all the assets you have in your project.
    We notice that iOS takes really really really long time to switch to and build for so we avoid building for that platform as often as we do with other platforms. We have to hack around using asset bundles built for WebGL when we try to use them in Editor. We get the known pink materials a lot.
    We get sound issues for unsupported format, too. All of these are knows to community but we hope that Unity team is going to work something better for those problems than our hacked approach which we always need to keep in mind.
     
  5. JustAnotherDude

    JustAnotherDude

    Joined:
    Oct 28, 2013
    Posts:
    279
    The biggest problem we had with assetbundles is that we couldn't check what was actually included in the bundles themselves, and lots of bugs, many were fixed in the recent patches though.

    An included asset bundle inspector on the editor, showing all the files and texture compression formats in the bundle, would go long ways to improve usage.

    One of the "bugs" (maybe it's intentional, IDK) I found, still happens and I couldn't yet find time to create an example project to report, but when I used loadfromcacheordownload and tried to instantly use the asset, instead of downloading it to cache them make it available to use, it would install to cache and them never return to the main function, I was required to make the function into a coroutine to be able to continue execution...

    There was also a small issue it had when trying to load an assetbundle from an file included in the project in the streamingassets folder, it loadfromcache was case sensitive, took a while to figure it was the problem :p
     
  6. BurningToad

    BurningToad

    Joined:
    Aug 14, 2013
    Posts:
    56
    Hello,

    I am working on converting our build for a large project (https://www.shroudoftheavatar.com/) to use the newer Asset Bundle system, and have noticed one thing in particular that seems to really slow things down. I am not sure if there is something I can do to improve it, if it is just the size of our project, or something Unity could fix. Thought I would post here to help get it noticed! Would love to provide more feedback of our experience using the Asset Bundle system as I dig into it more and get further along. http://forum.unity3d.com/threads/bu...-scripts-step-repeats-for-each-bundle.392110/
     
  7. mholub

    mholub

    Joined:
    Oct 3, 2012
    Posts:
    123
    How can I unload single asset from asset bundle? Resources.UnloadAsset(...) seems to at least destroy the asset, but I am not sure it plays nicely with asset bundle system.
     
  8. BFS-Kyle

    BFS-Kyle

    Joined:
    Jun 12, 2013
    Posts:
    883
    Who are you?

    Programmer with Blowfish Studios, have developed our internal build management tool and Asset Bundle management tools.

    What kind of game are you trying to build or would like to build?

    Have built mobile games in the past, and now console / desktop games.

    How do Asset Bundles fit into that? What use-cases do you have?

    For mobile games, want to keep the package sizes as low as possible (<100MB for initial install). Need asset bundles to do that (and we do use them for that). Also helps with updating, as we can push out new assets in the asset bundles without needing to update the client.

    For console / desktop games, we haven't gotten into using them much yet, but would like to use them mainly to support updating content without requiring a new build to be submitted.

    What are the GOOD things about Asset Bundles that you like?

    • Being able to update small parts of the game without re-downloading the entire game.
    • Reducing build size by splitting it up into parts

    What are the BAD things about Asset Bundles that you dislike?

    • Game becomes much harder to manage
      • Pre-Asset bundles, we could just load any scene and grab any resource object we needed.
      • Post-Asset bundles, we need to make sure it has all been downloaded and ready to go
      • Our Asset Bundle management tool takes care of this section though automatically (but we had to develop it internally)
    • Slows down development (and / or build times)
      • Lets assume we have our game scenes in an asset bundle, and the main menu is part of the base package
      • In the Editor, if I were to go and edit the game scene, lets say I move the player spawn position somewhere else. Then if I go to play the game again, it would load the main menu, then load the Game scene from an asset bundle which has NOT been updated with my immediate changes, and it would not show my new change.
      • The work-around for this is to not load the Asset Bundles in the editor, but to add the scene to the scenes list in the editor, which is easy enough to do (at least with our in-house build management tool it is). Other alternative is to re-build the asset bundle every time you make a change, but that just slows things down significantly.
      • This is easy enough for Scenes, simply tick them in the Build menu on / off. However for Assets, e.g. a texture, if it lives in an Asset Bundle and gets changes, then the same thing would happen - it would not update until you re-build the asset bundle or load the texture directly from the project. But in this case, its not as simple as just ticking a box to add the asset to the build. For assets, this is done by adding them to the Resources folder. The only problem here is that if you leave them in the Resources directory so you can test it in the Editor, then when you go to do a build, it will include those assets in the build (and the size will shoot up). So you need to put them into Resources in the editor, but move them OUT of resources for a build. For a single texture, this is fine - we automatically move files in and out of resources (have another folder called "Resources_NotInBuild" managed by our build tool) - however in one of our games, this adds up to thousands of files. Any time you switch between the two and move all the files in / out of Resources, it takes an hour to reimport things, which is totally unusable. I end up having to manage two separate clones of the project, one with files in Resources, one with files out of Resources, so that I can develop the game with one, and build the game with the other.
    • Can't easily include scripts. I know there are some tricks to make this work on certain platforms, but not all support it (reflection). And I know its not really a fault, but it would be super nice to be able to add or edit a script and just chuck it into an asset bundle. So many times we have bugs that are just one line of code that needs to change, and would be so much nicer to just push it out via an asset bundle.
    How can we make it BETTER?

    • Maybe look into some sort of Editor-Emulated asset bundles, which are not built, but behind the scenes re-map loads (e.g. AssetBundle.Load("myTexture")) into UnityEditor calls (e.g. UnityEditor.AssetDatabase.xyz). This would be very nice in the Editor, as it is still using the single-path of code for Asset Bundles, and will be much closer to how the final build would be outside of the Editor (e.g. would show issues if a file / scene was missing from the Asset Bundles)
    • Better UI to show asset bundles. Unity 4.x had nothing at all, all code - which is where we developed our GUI system for Asset Bundles. Unity 5.x has a tiny label to assign things to asset bundles, which is a step forward. But I believe you cant preview all asset bundles - you can't open a window and show a list of all the asset bundles that exist by name, and to show what assets exist in each bundle. Our tool has been doing this since 4.x, and helps to visualise them. Also helps to find when an old / unused asset is taking up space - the only way to know now is to inspect every single asset manually.
     
    hopeful likes this.
  9. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Who are you?

    One-man-studio.

    What kind of game are you trying to build or would like to build?

    PC (Mac/Linux) multiplayer games.

    How do Asset Bundles fit into that? What use-cases do you have?

    AssetBundles can be used as content patches for games, so adding new content is just a case of downloading the latest version of a given assetbundle.

    What are the GOOD things about Asset Bundles that you like?

    • Being able to update small parts of the game without re-downloading the entire game.
    • Reducing build size by splitting it up into parts
    • Having separate projects to keep/maintain each assetbundle. Makes a clean workflow.

    What are the BAD things about Asset Bundles that you dislike?
    • Instantiation freeze - which can add a frozen eon to game-startup. Must have multithreaded extraction and instantiation of assets from bundles. I know this is a joint issue, and probably my biggest gripe about Unity as a whole. Let me just reiterate my complaint... Stop Instantiation Freeze - pass instantiation to another thread.

    How can we make it better?


    Performance, performance, performance. I'm happy with everything else about AssetBundles.

     
  10. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    As I've (and some other people) mentioned in the End of Resources Folder thread, a wrapper for Asset Bundles that is syntactically same or at least similar to Resources.* calls, but instead scans all currently loaded asset bundles would be very helpful. The only reason I tend to stay away from AB is because they are a royal PITA to implement properly (compared to using Resources folder) and then load resources from them. A function to get a list of all asset bundles that exist in a given directory would be useful as well.
     
  11. TimCabbage

    TimCabbage

    Joined:
    Feb 13, 2011
    Posts:
    66
    > Who are you?
    Independent developer

    > What kind of game are you trying to build or would like to build?
    Moddable voxel based world with RPG and sim elements.

    > How do Asset Bundles fit into that? What use-cases do you have?
    1) Users download specially crafted mod project,
    - put in texture files,
    - write scripts,
    - (optionally) add shaders (not really crucial)
    Build their asset bundle and put it in a proper folder for the game. Folder is then scanned, Asset bundles are loaded and initialized. Users can enjoy their new content.

    2) Pushing small content fixes/updates
    - Content modularization: If I have a bug in one of my content packs(in a script), I replace a pack, not all of the project which reduces bandwidth and promotes modular design(which I like).

    3) DLC creation
    - Because all of the content can be created using interfaces/inheritance and textures, it becomes easy to interface complex mechanics without implementing a scripting language for *everything* and thus slowing everything down.

    > What are the GOOD things about Asset Bundles that you like?
    - Simplicity of texture preprocessing in editor translates into simplicity in mod creation
    - Free, full featured editor to create them(Users don't need to purchase Unity editor to make mods)
    - Small size, nice way of interfacing with the current resources.

    > What are the BAD things about Asset Bundles that you dislike?
    - No scripts inside.

    > How can we make it BETTER?
    - Enable creation of a lib to be included in an asset bundle.
    Obviously it would *not* work on majority of mobile platforms, but modding isn't big there (probably because You can't easilypublish there), unsure about consoles. But the Windows, Mac and Linux market would be very happy to have that.
    And it would require the user to create multiple versions of a mod for multiple platforms too, but with proper documentation, modding communities can thrive.

    Cheers,
    Sivael.
     
    darkhog likes this.
  12. ktweedy1

    ktweedy1

    Joined:
    Apr 16, 2010
    Posts:
    26
    Who are you?
    Independent developer

    What kind of game are you trying to build or would like to build?
    We create virtual worlds which are basically a selection of scenes, object list that are instantiated into the scene, and characters. The scene logic depends on the purpose of the scene. Everything from nurse training simulators, ecommerce spaces, presentations spaces and learning spaces.

    How do Asset Bundles fit into that? What use-cases do you have?
    We use asset bundles to separate the content from the executable. As such our uses cases are load scene, load objects and load characters.

    What are the GOOD things about Asset Bundles that you like?
    We like that we can separate the assets from the executable and dynamically download them at run time. We like that we can have asset bundles for different platforms.
    We like the Unity interface to manage the assetbundles and build them.
    We like the direction of manifest files and management of dependencies.
    We like the idea of being able to use asset bundles in the Unity Editor when testing.

    What are the BAD things about Asset Bundles that you dislike?
    I think that last changes to the asset bundles were kind of moving in the right direction, compared to only script based creation of asset bundles.
    1. For us, we would like to be able to manage the asset bundle list, although we kind of do that by selecting a folder, seems better if we can actually manage the list, and some objects can be added to more than one list.
    2. Now that manifest files are created at a project level we aren't sure how to handle asset bundles created in more than one Unity project and how to use asset bundles created in one Unity project with another Unity project. Separating content assets from the main scripting project makes multi-user development easier and scripting development faster.
    3. Better control of the file extensions used, and file name, or use ".unity". Not sure its safe to be using MIME defined as just ".", to get files without an extension.
    4. The way variants are done you can't control the file name extension. The file name extension is the variant name and won't let you have two "." in the name.

    How can we make it BETTER?
    1. I suggest a UI for managing the list of assets that are in an asset bundle, kind of like a c# DLL project is made where you can control the output file name, the list of assets it contains, what platform it can target.
    2. Support for asset bundles created from more than one Unity Project, and some how the application manifest handles this.
    3. Better control of file names and extensions.
     
    Last edited: Mar 21, 2016
    jakovd likes this.
  13. ratmat2002

    ratmat2002

    Joined:
    Jun 13, 2014
    Posts:
    35
    I'm unable to load AssetBundles built with BuildAssetBundleOptions.ChunkBasedCompression and placed in the StreamingAssets folder when running on iOS. The same AssetBundle and code load properly when running in the OSX Editor. I have verified proper building and placement of the bundle. All bundles downloaded usingWWW.LoadFromCacheOrDownload built at the same time work properly

    The error received in the XCode output log when running on a iOS device is:

    Unable to open archive file: /var/containers/bundle/application/9c2e7214-9980-4ea6-a8b8-1554f5cc0c9a/myvegas.app/data/raw/mybundle.unity3d

    Here is the code being used to load the bundle. According to the docs herehttp://docs.unity3d.com/Manual/StreamingAssets.html, it's best to use Application.streamingAssetsPath to get the location of the StreamingAssets folder and I assume this also means when running on iOS devices.

    AssetBundleCreateRequest abcr = AssetBundle.LoadFromFileAsync(Application.streamingAssetsPath + "/mybundle.unity3d");

    yield return abcr;

    if (abcr.assetBundle == null)
    {
    Debug.LogError("Error loading bundle mybundle.unity3d");
    }

    When running on iOS, I have also tried replacing Application.streamingAssetsPath with:

    Application.dataPath + "/Raw/"

    but them same error occurs.

    This same error exists on all versions of Unity from 5.3.2p4 through 5.3.4p1.

    I have seen some references to this issue in the forums but no formal response from Unity nor any specific confirmation that there is a resolution.

    Is there any fix for this issue? It's a show-stopper for the use of including AssetBundles in the iOS binary.
     
  14. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    You need to clarify at what point AssetBundles need to be rebuilt for Unity updates.

    The FAQ is vague.

    "Type trees are never included for mobile and console asset bundles and so you will need to rebuild these bundles whenever the serialization format changes. This can happen in new versions of Unity."

    Can happen?
     
  15. Erik-Juhl

    Erik-Juhl

    Unity Technologies

    Joined:
    Jul 11, 2012
    Posts:
    59
    Thanks everyone for taking time to give us your feedback on Asset Bundles. I will try to summarize everything said so far below. If you have feedback that hasn't been captured in the summary please post it here.

    The Good
    Good download size
    Can use compressed textures
    Being able to update small parts of the game without re-downloading the entire game.
    Reducing build size by splitting it up into parts
    Having separate projects to keep/maintain each assetbundle. Makes a clean workflow.
    Simplicity of texture preprocessing in editor translates into simplicity in mod creation
    Free, full featured editor to create them(Users don't need to purchase Unity editor to make mods)
    Small size, nice way of interfacing with the current resources.
    Can separate the assets from the executable and dynamically download
    Interface to manage and build


    The Bad
    Have to build for each platform
    Have to build for each Unity version
    All textures must exist in a Unity project
    Takes a long time to build
    Game becomes harder to manage when using asset bundles
    Slows down development
    Cant include scripts
    Instantiation freeze
    Cant manage asset bundle list
    Cant use or manage asset bundles across projects


    What could be Better
    Documentation
    Make extractable allowing the contents to be modified and then repacked
    Have some assets in more than one asset bundle
    Output location as an option
    Specify platform in AssetBundleBuild
    An includled asset bundle inspector in the editor
    Editor-emulated asset bundles which are not built
    Better UI to show asset bundles
    Performance
    Enable creation of a lib to be included in an asset bundle
    Better control of the file extensions used
     
  16. mdrotar

    mdrotar

    Joined:
    Aug 26, 2013
    Posts:
    377
    In addition to all that, I've got a few specific things to add.

    Who are you?
    Software developer at a small studio.

    What kind of game are you trying to build or would like to build?
    A 2D mobile game (iOS and Android) with high definition art.

    How do Asset Bundles fit into that? What use-cases do you have?
    Asset bundles are supposed to solve the HD/SD problem (see here). In addition to that, art for new game levels will be downloaded rather than packaged with the APK/IPA.

    What are the GOOD things about Asset Bundles that you like?
    • I can package not just art but animations, scenes, and potentially anything else I want with a TextAsset.

    What are the BAD things about Asset Bundles that you dislike?
    1. Unity is recommending that Asset Bundles be included in the build to solve problems like HD/SD but since AssetBundles must be built separately for each platform, and there is only one StreamingAssets folder for all platforms, it doesn't work. See this feedback item for more information. This isn't just for HD/SD, it's for any time an AssetBundle is to be included in the StreamingAssets folder, which has also been suggested as a way to LZ4 compress Truecolor assets in the build.
    2. There needs to be a preprocessing hook for building the game and/or asset bundles. For example, swapping in platform-specific assets into the build, or packaging custom data into TextAssets. There may be many different ways to initiate the build process so creating an additional menu item to do the processing AND start the build is not a good solution. See this feedback item for more information.
    3. PVRTC texture compression is too ugly for many art styles and yet it is the only compression option for iOS. LZ4 doesn't compress Truecolor sprites well enough. Sprites/textures should be packaged in the asset bundle using PNG or JPG compression, and decompressed/streamed to Truecolor when loaded. If the asset bundle is decompressed and cached, then the sprite must stay in PNG/JPG format until loaded into memory. This is not just an asset bundle problem but a more general Unity packaging problem. My iOS build is about 10x bigger than my Android build and cannot be released that way. See this feedback item for more information.
    4. Cached asset bundles don't get cleaned up properly, wasting space on the player's device. I don't remember the specifics but this thread and this thread discuss some variation of the problem.

    How can we make it BETTER?
    By fixing the bad things.
    1. Have Platform-specific StreamingAssets folders, like you do with Plugins.
    2. Have a pre-build hook that we can do our own pre-build processing in (for asset bundles builds and full builds).
    3. Store Truecolor textures/sprites in PNG/JPG format so they don't take up so much space. But this should be optional because some people might prefer larger build sizes to longer load times.
    4. Provide ability to manage asset bundles in the cache at runtime.
     
  17. iseta

    iseta

    Joined:
    May 5, 2016
    Posts:
    48
    Who are you?
    I'm an intern at an educational enterprise.

    What kind of game are you trying to build or would like to build?
    We have an educational project of augmented reality + books.

    How do Asset Bundles fit into that? What use-cases do you have?
    We want to diminish the size of the initial application, so that people would only download the scenes that they want to use.

    What are the BAD things about Asset Bundles that you dislike?
    Well, it would be good if the tutorials were explanative, a thing that they aren't. There are a lot of things missing, I, for example, am looking at a ton of tutorials for over 2 weeks and still, I can't make my system work.

    How can we make it BETTER?
    Please, PLEASE, I beg you Unity, make those tutorials more understandable. There are a lot of functions in the Asset Bundle Manager that doesn't even exist. Maybe it's just me, but I couldn't really make it work in any way I try because the bundles won't load properly unless the Assets are present in the Asset folder.
     
  18. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Who are you?
    Team lead of the Unity team in a semi seized mobile games development company.

    What kind of game are you trying to build or would like to build?
    Fantasy RPG, Tower Defense games, Adventure games for mobile and standalone.

    How do Asset Bundles fit into that? What use-cases do you have?
    As we're mostly developing mobile clients and don't want to update the clients everytime we have some content fixes (textures, 3d models, whole scenes...), we use Asset Bundles to update it.

    What are the GOOD things about Asset Bundles that you like?
    1. Build process much improved!
    It's pretty easy now to create an assetbundle. I really like that.
    2. Updating content without new client update
    That's the best thing about it. It works if you have a good asset pipeline set up (see below what can mess that up).

    What are the BAD things about Asset Bundles that you dislike?
    1. Debugging!
    You can't simply figure out what is wrong. Animator Controllers can't be seen, assets in the AB have all to be unloaded before you know what's the problem and then you don't actually know if you have the right version downloaded or if it is the cached one.
    2. Versioning
    Currently we have to track the downloaded versions on our disk, instead of checking if the AB is present and if so, which version it has. We thought about adding a textfile into the AB to achieve that, but we would prefere a "native" solution of course.
    3. Cross platform
    Ah... don't know how to fix, but it's not nice atm. We support 5 different versions (WebGL, iOS, Android, Windows and OSX editor) and we have to build our assetbundles for each platform. I think it's the least bad thing, but the first you fall into when working with ABs.

    How can we make it BETTER?
    1. I would like to see the versioning of assetbundles improved. If I could give the versionnumber in the AB buildprocess and later see it when I downloaded the AB, then it would be much simpler to check if you have the latest assetbundle or not.
    2. Also referencing assets from other assetbundles is not that intuitive. If that could be improved, that would be awesome. Currently we have some assetbundles which are loading all one texture on their own, instead of using only the same texture again. I know there is a way to workaround that, but it would be cool if our artists could setup "references" to other textures by themself.
     
  19. Orion

    Orion

    Joined:
    Mar 31, 2008
    Posts:
    261
    Who are you?
    I'm the developer of an indie studio.

    What kind of game are you trying to build or would like to build?
    A standalone PC title.

    How do Asset Bundles fit into that? What use-cases do you have?
    We have a lot of dynamic assets for procedural level creation. I used to just stuff all the prefabs, some textures, serializable objects etc. into the Resources folder, so I can specify a path, and get everything of a specific type from inside it. So I frequently have to get everything inside a folder, in order to select the appropriate assets for instantiation (e.g. load everything from "weapons" and then pick a random one of the correct type for my current enemy).

    I ran into major performance issues and I decided to move the content to Asset Bundles. It is said they can do all Resources can do, but it seems that is not the case. I do not know yet if it will actually work faster than using Resources, since I'm still far from finishing the switch.

    What are the GOOD things about Asset Bundles that you like?
    - Letting the user only download what has actually been updated.
    - The promise of decreasing build time by only building what has actually changed.
    - The promise of better performance when loading assets.
    - Still being able to test from the editor using the AssetBundleManager.

    What are the BAD things about Asset Bundles that you dislike?
    - I've spend the past 4 days watching tutorials, reading manuals and decyphering code, and I still don't know if I can get my use-case to work.
    - If I use AssetBundles directly, I can at least use LoadAllAssets<T> to get a specific type or GetAllAssetNames(), but I can't test in the editor (no simulation mode). If I use the AssetBundleManager, so I have simulation mode, I have to request an asset by the specific name AND specific type, which I do not know at that time.
    - I have to spend endless brain cycles wrapping my head around what has to go in which folder and which bundle, which is very error prone.
    - There is not enough information on AssetBundles.
    - It feels risky to adapt to a new system that seems error prone and incomplete.

    How can we make it BETTER?
    - Add the functionality of Resources to the AssetBundleManager. Most importantly Resources.LoadAll<T>(path);
    - Integrate simulation mode into Unity.
    - Create more use case examples.
     
    Last edited: Aug 23, 2016
  20. Reichert

    Reichert

    Unity Technologies

    Joined:
    Jun 20, 2014
    Posts:
    63
    Hi,

    I just wanted to send a quick note to first of all thank everyone for their input, and secondly to let you know we'll be talking about future development plans for Asset Bundles at Unite LA next week. If you are attending Unite, the session will be part of Track 2, Thursday at 1PM PST. I'll be sure to cross-post information from that session back here as well in case you can't attend.

    -Stephen Palmer
    Build Pipeline and Asset Bundle Lead
     
    radiantboy, pahe and BFS-Kyle like this.
  21. GuruNinja

    GuruNinja

    Joined:
    Jul 28, 2016
    Posts:
    7
    Hi, can i use google sdk and some free plugins (from unity asset store) in my asset which i am going to publish in unity asset store?
     
  22. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Here's the main feature I'd really love to see:
    -Create an option for loading assets from an exploded asset bundle. It takes a very long time to build asset bundles, and so this makes iterative testing difficult. It would be great to be able to organize all the content within the asset bundles, and be able to add and remove content, without having to build the bundles each time to see the results.

    In my current game, I have models that I'm adding to the bundles 1 or 2 at a time, and it's such a hassle to update the bundles, that I sometimes just drop them in the Resources folder instead so I can try them out.

    Also, to build asset bundles, I needed to manually add a script. It seems like this should just be built into the editor. Also, It would be nice to be able to build just one asset bundle because currently it seems to re-build all of them which takes around 45 minutes for my project.
     
    Last edited: Apr 11, 2017
  23. KyleHatch85

    KyleHatch85

    Joined:
    Dec 13, 2011
    Posts:
    99
  24. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Maybe I can join in here for @Reichert
    There has been made some progress, though it's not that related to our suggestions here:
    - Unity created a new tool for building Assetbundles (https://github.com/Unity-Technologies/AssetBundles-Browser), mostly a GUI for creating assetbundles. Helps a lot if you need to build for different platforms and you don't have a procedural approach.
    - There has been some improvements and fixes for assetbundles to be loaded more convienently (e.g. Android ABs needed a different load method for uncompressed ABs).
    - There's a new compression type added (chunk based compression LZ4 compression from 5.3.x) for faster loading (well, it depends on the size of your assetbundles)

    There could be more improvement I may have forgotten.

    What I can tell what has not improved (at least from my point of view):
    - debugging of created ABs. It's still a bit of a black box, though it has improved a bit with the AB-Browser (see above)
    - versioning of ABs is still handled from outside. That's still a concept which I think is confusing and unintuitive
     
  25. Reichert

    Reichert

    Unity Technologies

    Joined:
    Jun 20, 2014
    Posts:
    63
    I am working on a blog post that will serve as a progress report on asset bundle development. Stay tuned.
     
    tswalk, pahe and hopeful like this.
  26. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    Who are you?
    Artist and scripting indie game developer

    What kind of game are you trying to build or would like to build?
    SoaringSimulator is a 3d first person sailplane educational game in a virtual environment.

    How do Asset Bundles fit into that? What use-cases do you have?
    I was thinking it was a special promotion in the asset store.
    Did not know what was Asset Bundles was until today.

    What are the GOOD things about Asset Bundles that you like?
    New is better...Is a new idea and looks good.

    What are the BAD things about Asset Bundles that you dislike?
    • I do not understand the difference between package and Asset Bundles.
    • Need a UI that is missing
    • Must be made in the same Unity Vr?
    • The name can be confusing. (with Asset Kits or similar)
    How can we make it BETTER?
    Include it into the editor?
    Video tutorial in learning section and link to :
     
    Last edited: Jun 8, 2017
  27. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
    I know I'm beating a dead horse here saying this; however, could you provide some documentation on batching Unity to build asset bundles from a command shell?
     
  28. samnarain

    samnarain

    Joined:
    Jul 6, 2015
    Posts:
    99
  29. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,551
    Who are you?

    CTO of Dreamlords Digital. We are a small indie dev studio, and I am so far the only competent programmer we can afford (i.e. I don't pay salary to myself).

    What kind of game are you trying to build or would like to build?

    We're making a turn-based game called Graywalkers Purgatory. This is a game where a lot of the events in combat are decided by dice rolls and formula (think of Baldur's Gate, Neverwinter Nights, Icewind Dale, Temple of Elemental Evil, etc.) The game is "powered" by tabletop rules (while the other games I mentioned use the Dungeons and Dragons tabletop system in their various versions, we made our own tabletop system that we use).

    From a tech point of view, it's very content-driven. I made a lot of custom tools to let users create items, characters, races, classes, skills, abilities, maps, missions, conversations that will be used in-game. These tools can be used in-game during runtime, or in the Unity Editor. All files are saved as JSON text files.



    I did this because:
    1. This is an RPG with a lot of content, so tools to rapidly create content is a must.
    2. For our teammates (writers) who are not proficient with Unity or reluctant to use it, they don't have to use Unity to add content.
    3. These tools will be modding tools for the players later on.

    How do Asset Bundles fit into that? What use-cases do you have?

    All of the custom tools I made so far work well, except that it can't be used for assigning 3d models and animations.

    We could add a runtime FBX importer in our game, but that still won't let us easily add Mecanim animations to those 3d models (the 3d model has to be configured first for Mecanim). So the other choice is to put the art into Asset Bundles, then let our game use those.

    For example, my planned functionality for this is: I create a character, and I want to assign the 3d model for it, so I click the button to assign the 3d model, browse my hard drive to find the Asset Bundle file with 3d models in it, explore the insides of that Asset Bundle file as if I'm browsing folders (much like browsing a zip file in Windows Explorer), find the 3d model inside that Asset Bundle file and then select it.

    Please note that I have my own GUI and code for browsing the hard drive (I don't use the system file open dialog), so adding that "browse the insides of an Asset Bundle file" is feasible.

    Also, for modding the game, players could download the free version of Unity (assuming they download the same version of Unity that we use), import their art into a new empty project, build it as an asset bundle, and it can then be used in-game.

    What are the GOOD things about Asset Bundles that you like?

    This would mean the main project of the game has close to zero 3d model and animation assets (I will only leave some in to be used as fallback assets).

    All of the 3d models and animations intended for use will be offloaded into Asset Bundles instead (these asset bundles will contain purely 3d models and/or animations, no prefabs or ScriptableObject assets, to keep backwards compatibility issues to a minimum).

    This means build times whenever I'm iterating on new features for the game will be fast, since it doesn't have to pack a lot of art inside the build.

    This also means the production of art by our team doesn't have to be bottlenecked by the development of the main build. They could create asset bundles by themselves and see their work in-game without needing to ask me to build a new version of the game.

    What are the BAD things about Asset Bundles that you dislike?
    1. Not a user-friendly way of building asset bundles right now (has to be via code). I know there is an experimental Asset Bundle Graph Tool for building asset bundles, but I don't know the status of that. I also recently saw the Asset Bundle Browser, though I have yet to try that out.
    2. Concerns with backwards compatibility not working in certain situations (see examples like this). This is the only potential pitfall I can see, if I ever implement this "loading of AssetBundle files" functionality into the game.

    How can we make it BETTER?
    1. Give more coffee or pizza to @unity_bill or whatever it is he needs to finish making the Asset Bundle Browser be production ready.
    2. Keep asset bundles backward compatible as much as possible.
     
    Last edited: Jun 30, 2017
  30. samnarain

    samnarain

    Joined:
    Jul 6, 2015
    Posts:
    99
    It is really well maintained by Hiroki (almost daily) and is quite mature. You cannot only build Asset Bundles, you can design a whole process to create them (including command line / headless integration) and has a lot of features (like JSON import/export and video for 5.6) and is 1.3 at the moment.
     
    tswalk and hopeful like this.
  31. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    241
    Hi @Reichert,

    I know this thread is a bit older but seems to be most fitting for this:
    One of our biggest gripes with the current system to build AssetBundles is that we have to select one of the BuildTargets, which means it will only include shaders for that platform. This means the most we can get in one bundle for our targets (Linux / macOS / Windows) is DirectX, Vulkan, GLCore by using BuildTarget.Windows. Metal will be missing, as well as potential other targets if there will be more at some point.

    It would be really nice if we could select multiple BuildTargets at once or specify the graphics APIs when building so the other shaders get included too. At least for the PC platforms it seems that's the only issue with sharing the same bundles.

    This is an issue both for us (we have to build the bundles more often than it would be required and can't share them among the platforms, but *we* can work around this at least) but also for users that want to mod our game and also create bundles. It becomes unnecessary complex for them to create their bundles multiple times so they work on all three platforms which often leads to macOS (because of Metal) ending up unsupported.

    TLDR: Please add an option to the BuildPipeline.BuildAssetBundles methods to either specify multiple BuildTargets or allow specifying the GraphicsDeviceTypes so that we can include more shader targets in a single bundle for (standalone) platform compatibility :)

    Regards,
    Chris
     
    AnomalusUndrdog likes this.
  32. Alloc

    Alloc

    Joined:
    Jun 5, 2013
    Posts:
    241
    Hi @Reichert,

    any chanc we can get any feedback on this? Ideally one that says "yes, we're going to do something like this"? ;)

    Regards,
    Chris
     
    pahe likes this.
  33. sfssddff

    sfssddff

    Joined:
    Nov 15, 2013
    Posts:
    9
    For our purposes user uploaded created content asset bundles make no sense it’s too slow to build , you have to build for each platform, every version of unity requires a differnt build.