Search Unity

Addressables Production Ready?

Discussion in 'Addressables' started by NateReese77, Jul 8, 2019.

  1. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    26
    Hello,

    I wanted to check in and see the production ready status of Addressables - I ask because the package itself is still listed in 'preview'. Last fall a few Unity people stated that projects shipping in the second half of 2019 should make the jump over to Addressables. Additionally in this tutorial it states at the top to use addressables:
    https://learn.unity.com/tutorial/assets-resources-and-assetbundles

    So basically I wanted to check and see if it was safe / proper to use them in a production ready environment as the package is still in 'preview'.

    Thanks!
     
    phobos2077 likes this.
  2. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    In general, I would say Addressables are far from production-ready at the moment. They still have serious troubles with dependency resolution and minor things like providing progress values of downloading tasks.

    However, depending on your project, you might be able to bypass all these issues if you don't have a complex dependency situation between assets or any special requirements for Addressables.
     
    phobos2077 and chanon81 like this.
  3. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    26
    Thanks @stefankohl - our pipeline would be fairly simple. We are shipping PC first with a mobile counterpart launching Q1 2020. We figured the PC version would include all bundles internally so there wouldn't be any downloading tasks etc. We'll prob do a few tests this afternoon to see how they fit / work.

    I'd love to get an official Unity response on this, as we need to make a decision this week between traditional Asset Bundles and Addressables. We are worried about using Asset Bundles as the documentation specifically says they are depreciated...
     
    phobos2077 likes this.
  4. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    Which is really funny considering that Addressables literally generates asset bundles.

    The long view clearly is one in which Addressables has its own format and no longer exports bundles, but even once that happens I would expect that it would be at least a year or two before bundles are sunset, with another year of grace period before they aren’t supported any more. Maybe longer.

    I base this mostly on their track record with, for example “JavaScript” Support as a scripting language, which they only dropped once their analytics indicated that about 3% of projects contained more than a few js files.
     
    phobos2077 likes this.
  5. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    I've migrated an Asset Bundle project to Addressables and ran into a lot of problems (still unresolved). Another project was using Addressables from scratch and it worked much better. Traditional Asset Bundles require more programming work to be done in order to have a running system due to the AssetBundleManager of Unity being outdated. If you don't have any package system set up yet, you might be faster just trying out Addressables and see how stable it turns out to be.
     
  6. pyphehe

    pyphehe

    Joined:
    Feb 17, 2018
    Posts:
    12
    We spent two weeks to migrate to addressable. Now I can tell you it's not ready for production at all. Trust me, Don't waste your time on this!
     
    funkyCoty, phobos2077, RobbyZ and 2 others like this.
  7. Could you throw me a link where is it says it's deprecated? (I haven't found any trace of this in the documentation) Because as far as I know it shouldn't be. I'm also coming up to a decision how to handle my product's assets.

    Can you give us more info on this? What problems did you face and on what target platforms? I would really appreciate it.

    ---
    My project is coming to the state where I need to lay down the foundation how I want to handle assets on the larger scale. I'm also thinking to do it through Addressables. My target will be desktops (Windows, Osx, Linux) only.
    Any details you can share what kind of problems you faced would be appreciated. Since I will be the only one who is working on the asset handling (among any other problems), any info would be invaluable for me.
     
    phobos2077 and RecursiveFrog like this.
  8. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    26
    Hey @Lurking-Ninja -

    Here's the link:
    https://learn.unity.com/tutorial/assets-resources-and-assetbundles

    It's right in the Summary:
    PLEASE NOTE: this tutorial has now been deprecated. We now recommend using Addressables for your projects and will be providing more documentation and tutorials on this feature soon. In the meantime please refer to the Unity manual

    I think we are just going to stick with loading stuff from resources to the time being, then migrate to addressables later this year when they are a little more mature. We are releasing PC first so we don't need to download any assets remotely. Would still love an official Unity response on this as the documentation is a lil conflicting and I'd really like to know best practices for our studio.
     
  9. Ak ok, a tutorial is deprecated not the service. That's an important distinction.
     
    phobos2077 likes this.
  10. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    The problem with just going back to resources is that it’s not Async. How much architecture do you really want to reconfigure to be async at the last minute, after the whole thing has been built with synch in mind?

    If I were planning to go with resources in the short term and then replace it with Addressables later I’d hide it behind an async API that you roll yourself, so that only the internals change instead of the entire architecture
     
    phobos2077 likes this.
  11. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    245
    Resources can be loaded asynchronously: https://docs.unity3d.com/ScriptReference/Resources.LoadAsync.html
     
  12. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    It's more or less a chicken and egg situation. So far the package is not out of preview, and indeed it has some glitches and perhaps a few bigger issues. To make it truly production ready, it requires a group of early products adopting to this system. In this thread, you haven't heard about enough confidence, since most folks here are still in the process of learning or adopting their products.

    But as @unity_bill wrote in announcement that,
    At least Unity team and early adopters are on the same track.
     
    NateReese77 likes this.
  13. Karsten

    Karsten

    Joined:
    Apr 8, 2012
    Posts:
    187
    I looked into them today I and I doubt they ever will be what they meant to be, the whole system is already so komplex that you will need a seperate team to manage your content in case this will ever work properly, not to mention the extra code you need to handle them . I personally think they should have gone not so deep with it, and make it more static and simple at first.
     
    phobos2077 and chanon81 like this.
  14. MFG-jkhoo

    MFG-jkhoo

    Joined:
    Jul 15, 2016
    Posts:
    19
  15. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    yeah. AssetBundles are gonna be around for a while.


    Any specifics? If I look at your profile, the only post you've made https://forum.unity.com/threads/1-1...roject-contains-editor-only-resources.697478/ was one we fixed in 1.1.4 (that was the only thing fixed in 1.1.4). If you have other specific problems, we'd love to hear them.

    Some specifics here would be great as well. If possible, please start a new thread with what you ran into that caused you problems.



    All in all, we know addressables isn't perfect. If you run into a problem, please file a ticket against Unity. Forum posts are helpful too, but bug reports are much easier for us to chase down, and not let slip through the cracks.
     
    Lurking-Ninja likes this.
  16. magmagma

    magmagma

    Joined:
    Oct 27, 2017
    Posts:
    41
    I have run into a lot of problems that seem to happen only in builds but work perfectly fine in the editor (in any of Fast/Virtual/Packed modes). Things are quite weird, like you go to a scene (the scene itself is addressable) and maybe it's fine but then you go to another scene (which is not in itself addressable but uses addressables inside, and uses some of the same stuff as the previous one) and some addressables fail to load, and of course due to that nothing works. But then if you restart the game and go to the second scene first, it works fine and the addressables load without problems, even if afterwards you go to the first scene, it still works normally.

    Then sometimes the first scene fails too but the addressables are not showing errors in this case (Instead there is a null reference exception of a component in one of the objects that was loaded through addressables. The most recent one we saw: a scriptable object has an array of structs, and inside one of those, there is an array of 3 other scriptable objects, of which the third one didn't load and is now null) so we're not sure where it went wrong...

    Then maybe you try something like running the Addressables Analyzer to fix some duplicates, and after that some different objects are not loading at all (in our case the postprocessing dissappeared completely, for example), so it keeps getting weirder hahaha.

    I have a hunch it has to do with the order in which things happen when loading assets, but I still don't know how to accurately reproduce it in an easy project and I don't have that much time for that right now...

    Still the fact that it all works fine in the editor makes it very hard to debug. And that gives me the opinion that it is still not ready for production...

    But I'm very much looking forward to new updates and hopeful that they will also help me as well, hehe.
    Keep up the good work.
     
    Last edited: Jul 17, 2019
    phobos2077 and chanon81 like this.
  17. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    Unfortunately, I wasn't able to isolate the problem in an empty project despite using a similar dependency structure.

    The situation occurs when having transitive dependencies between multiple prefabs and ScriptableObjects in different asset groups. For example, loading addressable scene S with addressable prefab P1 instantiating addressable prefab P2 which accesses addressable ScriptableObject SO, with S, P1, P2 and SO being in different groups each. The reference to SO in P2 is then null when using packed play mode.

    It worked with asset bundles and a custom dependency resolution script, but after migrating to Addressables, it seems like the loaded scene is already starting while async loading bundles are not entirely loaded.
     
  18. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Can you file a bug against Unity with a sample project? This is definitely something we can and should fix, but have not been able to repro in our tests.

    So S knows about P1, P1 knows about P2, and P2 knows about SO? And each of these connections is an addressable one (not a Unity direct reference)? Just want clarification so we can attempt to repro.
     
  19. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    Exactly, P1 is a prefab placed in S. P1 refers to P2 and P2 refers to SO, direct references, no addressable references. However, each of those are part of addressable asset groups.

    I spend some time debugging today and I actually was able to resolve one occurrence using the exact same relation by analyzing and fixing duplicate dependencies. AFAIR there has already been a discussion in this forum about Unity failing to resolve asset duplicates. Maybe this is related to it.

    Anyway, I couldn't find a solution for a more complex relation S -> P1 -> P2 -> SO1 -> SO2/P3.
    SO1, SO2 and P3 are in the same bundled asset group, but SO2 and P3 always stay "null" (not null).
     
  20. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Thanks for the info, we'll look into it.
     
  21. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    26
    Thanks for all the feedback. I think we are going to move forward with Addressables in the next month or so - especially seeing that Unity is focused on 1.0 + Bug fixing we are feeling good for our use case.
     
  22. Unity_Joseph

    Unity_Joseph

    Unity Technologies

    Joined:
    Nov 3, 2016
    Posts:
    16
    @stefankohl I recreated the dependency scenario you're describing locally but am unable to reproduce it. Could you create a minimal repro project?
     
  23. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    I already tried, but it works fine in my minimal project. It only fails on the player builds of my big project (not when using packed play mode in editor).
     
  24. SolarianZ

    SolarianZ

    Joined:
    Jun 13, 2017
    Posts:
    237
    @unity_bill Is there any way to disable Addressables init log? Thanks!
     
    Last edited: Jul 24, 2019
  25. Unity_Joseph

    Unity_Joseph

    Unity Technologies

    Joined:
    Nov 3, 2016
    Posts:
    16
    @stefankohl Could try making a copy of your project and then stripping it down as much as possible? I need a way to reproduce the issue.
     
  26. magmagma

    magmagma

    Joined:
    Oct 27, 2017
    Posts:
    41
    We recently figured out one of the problems that occurred only in a build.

    It turned out a scriptable object was somehow corrupt.

    First let me explain the error:
    If you looked at it in the editor, it seemed perfectly fine. When you played in the editor, it worked perfectly fine (it is loaded via addressables).
    However, when playing a build, upon loading the file, an addressables "resource exception" or something like that would occurr and the file would not be loaded. Just in the build. It was super weird because if you went to this scene first, sometimes it worked, but then the next scene would not load the other addressables of the same type. Sometimes it just didn't work at all. However if you went to the other scene first, then back to this one, it would work... what.

    We tried so many things and moved so much stuff around to try to solve this... rebuilt so many times with changed settings...

    At one point, we made an editor script to replace elements of an array that that file has automatically (because we needed to update them), and when we ran the script, it failed with a null reference exception on the first element of the array. Remember that in the editor it looked and worked perfectly fine. So somehow this file became corrupt.

    To fix it, we opted for replacing elements of the array manually, then reimporting the file, duplicating it, and deleting the original one... (this might have been overkill, but it worked out in the end at least). We are not sure how it became corrupted, but it happened. After this, the build worked correctly.
     
  27. Unity_Joseph

    Unity_Joseph

    Unity Technologies

    Joined:
    Nov 3, 2016
    Posts:
    16
    Interesting. I could only speculate on how the asset got into that corrupt state. Thanks for the description of what happened. If you start seeing this behavior again, or find a way to reproduce this state, please let us know the details.
     
  28. MoctezumaDev

    MoctezumaDev

    Joined:
    Aug 14, 2013
    Posts:
    53
    One of my biggest worries right now it's the UX direction this project is tacking, I hope they put some effort on this for the next releases because, the documentation is not good, the examples are not good enough and I got confused with all this scriptable objects added to the project and all the working flow seems to unpractical to be production ready.
     
    phobos2077 and chanon81 like this.
  29. Favo-Yang

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    464
    I know the learning curve is a bit steep, because of lacking good documentation, tutorial and best practice. And it need a certain level of knowledge to master the system. It's not something to pick up and just work magically.

    The first time I start with the package, I even expect every assets in my project folder can be automatically get updated, with no code changing at all - the magic time. But appearly AAS introduces the async semantic, and other concepts...

    Based on my experience with new feature development of Unity, it's used to be worse. They revives *exciting* stuff every year, while the actually development is bumpy. But that process of rolling out new stuff are getting better, thanks for the package approach (source available), and listened developer on the forum. Anyway, let's see what we can do to help. Since Unity blogging the addressable system out of preview, people expect a smooth learning curve.
     
  30. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Hopefully by the time this is considered "production ready" we'll have UI at least as good as the old asset bundle browser, which is invaluable for setting up your dependency tree in the most efficient manner possible
     
    phobos2077, chanon81 and MoctezumaDev like this.
  31. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    I've sent you a link to the repro as PM. Did you receive it?
     
  32. MoctezumaDev

    MoctezumaDev

    Joined:
    Aug 14, 2013
    Posts:
    53
    @zornor90 exactly I had the same thought, the asset bundle browser is great, was long awaited and this new package doesn't work with it. I'm very dissatisfied the direction this package is tacking.

    We do need something like AssetReference and a method like Addressables.LoadAsset, with a settings were you provide an url for remote content, and unity should run a local server in case you want to emulate it locally and should be as simple as a checkbox. We need something like the asset bundle browser which was a great addition. All this other stuff and settings, a different workflow as ridiculous as having to have checkboxes to indicate weather is addresable or not, having drop boxes instead of fields for the AssetReference in the inspector, having all this versioning stuff and grouping thing feels like creating a solution for something that was already solved and was already more familiar for the community and that would not break things like the asset bundle browser.
     
    phobos2077 and chanon81 like this.
  33. Kerber996

    Kerber996

    Joined:
    Nov 9, 2016
    Posts:
    23
    I will be using Addressables in a future project as i have pretty much made everything i need to work. After a month of tinkering, testing, update-ing and changing, i have hit a point where I'm confident that the feature i need the most is working, which is the system recognizing that a new catalog is present and updating it's content from a remote server.

    So, as far as I'm concerned I'm only confident enough in using Addressables in a project for a client because if it stops working, i could just stop using Addressables and give the client whole builds instead of updates.
     
  34. MoctezumaDev

    MoctezumaDev

    Joined:
    Aug 14, 2013
    Posts:
    53
    Yeah, I still have not taken a decision and the project I'm currently working on will be for an important client so I'm not in the same comfortable situation.

    All this also makes me wonder how long is the legacy workflow going to be supported?
     
    phobos2077 and Kerber996 like this.
  35. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    I'm currently writing my own quasi-addressable system because the current one is not production ready, unfortunately I think a lot of people are in the same boat. It lacks a lot of addressables features but it also has a lot fewer bugs and I can use the asset bundle browser
     
    phobos2077 likes this.
  36. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,513
    I wanted to mention here that I just finished up an article about using the AssetBundleManager. I wrote the majority of it last year, but never finished it until now, because I thought that maybe Addressables would already be ready for production. It's true that AssetBundleManager has a lot of problems with it, but at least it's something, until Addressables get to a more usable state.
     
    phobos2077 and Kerber996 like this.
  37. Kerber996

    Kerber996

    Joined:
    Nov 9, 2016
    Posts:
    23
    aer0ace likes this.
  38. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    stefankohl likes this.
  39. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    @stefankohl - I have confirmed with your repro project that on 2019.3.0a12 the things look the same in fast mode and in packed. So this is resolved by the engine update.
    The fix will be backported to 2019.2 and 2018.4. I cannot yet speak to when these backports will happen.
     
  40. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    Thank you, I can confirm the same!
     
    unity_bill likes this.