Search Unity

Addressables Production Ready?

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

  1. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    12
    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!
     
  2. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    28
    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.
     
    chanon81 likes this.
  3. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    12
    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...
     
  4. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    142
    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.
     
  5. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    28
    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:
    3
    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!
     
    chanon81 and faolad like this.
  7. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,883
    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.
     
    RecursiveFrog likes this.
  8. NateReese77

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    12
    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. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,883
    Ak ok, a tutorial is deprecated not the service. That's an important distinction.
     
  10. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    142
    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
     
  11. DED-Games

    DED-Games

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

    Favo-Yang

    Joined:
    Apr 4, 2011
    Posts:
    96
    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:
    99
    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.
     
  14. MFG-jkhoo

    MFG-jkhoo

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

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    630
    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:
    8
    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 at 8:47 AM
  17. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    28
    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

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    630
    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:
    28
    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

    Unity Technologies

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

    NateReese77

    Joined:
    Jun 14, 2017
    Posts:
    12
    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.