Search Unity

Addressables are here!

Discussion in 'Addressables' started by audrey-unity, Jun 15, 2018.

  1. Leoniciux

    Leoniciux

    Joined:
    Aug 14, 2013
    Posts:
    43
    Capture5.JPG

    I was able to get the Addressables System package, but something is not right, I can build in visual studio and the application runs without problems. I use VS along with ReSharper and I get some unresolved symbols warning with Addressable namespace and if I try to edit the code then VS hangs, for now I ended editing the code with VS Code.

    Capture2.JPG

    The first AssetReference that I added in the code, after clicking in the dropbox asked me to create or import a configuration, I clicked in create and I got a similar error that some people got above.

    Capture.JPG

    I close and re-open unity and the settings where now there and I didn't get any of the previous error and the assetreference dropbox was now displaying different stuff.

    Capture3.jpg

    ! >>> Why is the "build" button grayed out in the Addressable Asset Window?

    Capture6.JPG

    When do you expect to have a stable version? I need to decide weather I should keep trying this or go back to my previous workflow with AssetBundles. I was hoping this would be in a stable situation once the 2018.2 had been officially released, seams like it's not the case :'(
     
  2. Leoniciux

    Leoniciux

    Joined:
    Aug 14, 2013
    Posts:
    43
    mukultictoc likes this.
  3. AndersonDev

    AndersonDev

    Joined:
    Dec 13, 2015
    Posts:
    87
    But the main advantage of this for me is speed up process. I want to change some of assets press build button and deliver only that bundle to server. Run the game and play with new settings.
     
  4. andersemil

    andersemil

    Joined:
    Feb 2, 2015
    Posts:
    53
    Sorry no that's not true. You can put as many scenes as you like in one assetbundle; however, you cannot mix scenes and specific assets. An assetbundle is either a collection of scenes and their referenced assets (with no separate assetbundle specified), or a collection of assets.
     
  5. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    389
    If you're in a hurry developing, go with the normal asset bundle system, but build it similar to how addressables work, converting from your custom made system to addressables will be quite easy then.

    I think they're going to take quite a long time before this awesome piece is actually done and ready for production. Even their claims of releasing a new version "end of the week / early next week" is long due and there's still no new version. So I wouldn't expect a version 1.0.0 anytime soon if they're already holding back. They haven't even introduced it through the regular package manager yet. Its a manually added line to actually fetch the addressable system.

    I am glad they're actually implementing this, so waiting patiently for the system is key. In the meanwhile just use something else.
     
  6. Leoniciux

    Leoniciux

    Joined:
    Aug 14, 2013
    Posts:
    43
    Yeah sure I think it's far from stable but it's a great feature one that I've been looking forward for a long time just like the nested prefabs, I'm very pleased that they are finally putting time in this issues.
     
  7. Amaron77

    Amaron77

    Joined:
    Jun 16, 2018
    Posts:
    5
    One thing I'm not clear on in this system:

    1. Suppose I have several different prefabs with an AssetReference pointing to a single Addressable.
    2. Suppose I then rename that Addressable.

    Will the AssetReferences break? Do they need to be rebuilt or something? Does the system just update all of them as soon as I change the name?

    Also what if I wanted all those AssetReferences to now point to a totally different Addressable? Is there a quick way to do that?
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,510
    AssetReference uses the asset Guid so its fine to change the name, it will still work. The only thing that would need to be updated would be the meta data, the assetbundle/s should not need to be rebuilt for name changes.
    If you want to have them point to a totally different Addressable then one way would be to use a label instead. We have AssetLabelReference for this. You can then just change what the label is attached to.
    AssetReference is just one way to get to assets, you can do it in many other ways. You can just store a string of the name/guid and get the asset using that, you can get one or more assets using labels, for example, get me all assets that have the label french and main-menu etc.
     
  9. mf_andreich

    mf_andreich

    Joined:
    Jul 7, 2017
    Posts:
    23
    In sources I see that label can be converted to int64 bit mask... And Ilittle bit confused. Thats mean we can use only 64 labels?
     
  10. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,510
    Yes, there is currently a limit on the number of labels. This has been already flagged as an issue and should be addressed in the future.
     
  11. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    303
    In my project I use a lot of prefabs which I wish to load one-by-one on request. Using asset bundles I implemented it splitting each prefab to a bundle, but it's not the best way using 300+ models.
    Will addressables allow load prefab using single bundle? I checked the packing mode for Addressables - does it mean I still will need to split each prefab to bundle?
     
    Last edited: Jul 26, 2018
  12. FlatCube

    FlatCube

    Joined:
    Sep 29, 2013
    Posts:
    17
    Does addressables work only at runtime?
    I have an editor script to test and preload some assets but it looks like the async operation returned isn't calling Completed, it works fine at runtime though.
     
  13. gianfanatee

    gianfanatee

    Joined:
    Jun 14, 2016
    Posts:
    13
    Hi @karl_jones , I'm also curious for answers regarding Allan Smith's questions. I'd also like to know how addressables play with Apple's App Slicing.

    Thanks,
     
    Goldseeker likes this.
  14. FlatCube

    FlatCube

    Joined:
    Sep 29, 2013
    Posts:
    17
    Is there a fix to this issue?
    Unity 2018.2.1f1, Addressables 0.1.2. Occurs only in PC Win64bit build, not in editor.

    Code (CSharp):
    1. Exception: Unable to load runtime data.
    2.   at UnityEngine.AddressableAssets.InitializationOperation.OnDataLoaded (UnityEngine.ResourceManagement.IAsyncOperation`1[T] op) [0x00000] in <00000000000000000000000000000000>:0
    3.   at UnityEngine.ResourceManagement.AsyncOperationBase`1[TObject].InvokeCompletionEvent () [0x00000] in <00000000000000000000000000000000>:0
    4.   at UnityEngine.AsyncOperation.InvokeCompletionEvent () [0x00000] in <00000000000000000000000000000000>:0
    5. UnityEngine.Logger:LogException(Exception, Object)
    6. UnityEngine.Debug:LogException(Exception)
    7. UnityEngine.ResourceManagement.AsyncOperationBase`1:InvokeCompletionEvent()
    8. UnityEngine.AsyncOperation:InvokeCompletionEvent()
    9. (Filename: currently not available on il2cpp Line: -1)
     
    mf_andreich likes this.
  15. mahaiting

    mahaiting

    Joined:
    Apr 30, 2018
    Posts:
    3
    I have the same question with you , who can help to answer ? thanks.

     
  16. mahaiting

    mahaiting

    Joined:
    Apr 30, 2018
    Posts:
    3
    I want to create a confirm panel to user before update assets from remote server . How to do ?
     
  17. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    I have a scene in the "Default Local Group" which I load at runtime. The scene loads fine but all script dependencies are missing (e.g. "The referenced script on this Behaviour (..) is missing!"). Is it possible to include the scenes dependencies?
     
    Last edited: Aug 1, 2018
  18. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,510
    Dependencies can be included however scripts are a different story. Asset bundles do not support scripts. There are some ways around this, however, some platforms have limitations that make it very difficult. Having the scripts in the project is the simplest approach.

    https://docs.unity3d.com/540/Documentation/Manual/scriptsinassetbundles.html
     
    bilke likes this.
  19. rastlin

    rastlin

    Joined:
    Jun 5, 2017
    Posts:
    105
    This preview package has been released one and a half month ago. One of the advertised advantage of the package approach was the ability to deliver incremental updates regardless of the editor schedule (more frequent - I presume).

    Since the original release there is no news on any updates to the preview. I wonder what is the idea for development support for this package? There are some bugs reported, and while Unity acknowledges they are know and being worked on, I see no information on potentially when they will be fixed.

    If this approach continues I'm kind of afraid to invest any time into this package, the Editor would get 3 hotfix releases in this time frame already.
     
  20. james7132

    james7132

    Joined:
    Mar 6, 2015
    Posts:
    110
    I'm also going to echo this sentiment. The tentative release of 0.2.1 also doesn't seem to address some of the big bugs brought up either. I still can't assign a AssetReference properly from the Editor due to some UIElements issue: (FogBugz: 1062060).

    I'm very much looking forward to using Addressables, as the current Asset Bundles system my group has established is slowing down everyone's workflows, which Addressables seems to address. However, this otherwise stale cycle of updates, and lack of communication is making me question how much to invest into it right now.
     
  21. strich

    strich

    Joined:
    Aug 14, 2012
    Posts:
    280
    Going to echo the above too - Thought I'd potentially start using and providing feedback on Addressables but there are a myriad of basic showstoppers right from the beginning. It is a preview of course, but it appears that this particular project doesn't have much time being put into it right now given the slow speed it is running at.
     
  22. mukultictoc

    mukultictoc

    Joined:
    Sep 24, 2016
    Posts:
    9
    Why are Addressable assets not on roadmap for unity features ?
    https://unity3d.com/unity/roadmap

    Is there any kind of fixed timeline on this system ? Im really looking forward for the updates and it seems there is not much progress.
     
    hopeful likes this.
  23. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,510
    It should be on the roadmap, we will look into it. Possibly a bug in our roadmap.
     
    mukultictoc likes this.
  24. Baraphor

    Baraphor

    Joined:
    Nov 16, 2016
    Posts:
    32
    How is this system going to work with the new Apple require starting in January 2019.

    4.2.3
    • (iii) If your app needs to download additional resources, disclose the size of the download and prompt users before doing so. Existing apps must comply with this guideline in any update submitted after January 1, 2019.
     
  25. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    955
    As discussed here, we've got it on our list: https://forum.unity.com/threads/req...pre-downloading-caching-remote-groups.537354/
     
    karl_jones likes this.
  26. Baraphor

    Baraphor

    Joined:
    Nov 16, 2016
    Posts:
    32
    unity_bill likes this.
  27. sxmad

    sxmad

    Joined:
    Nov 4, 2014
    Posts:
    5
    when downloaded the bundle from remote server, then where is the bundle cache? I cannot find in PersistentData folder... :(, in Persistent Data folder, just found config file(catalog_1.json && catalog_1.hash)
     
  28. Scorr

    Scorr

    Joined:
    Jul 2, 2013
    Posts:
    46
    The Getting Started document shows how to migrate direct references to use AssetReferences. What is the benefit of this? It seems to me there are only downsides because the type is not clear (AssetReference can be anything), and you have to make your code asynchronous and have no idea when it's ready (the next frame maybe?), as opposed to being ready from the start with a direct reference.
     
  29. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,510
    https://unity3d.com/learn/tutorials/topics/best-practices/assetbundle-fundamentals
     
  30. sxmad

    sxmad

    Joined:
    Nov 4, 2014
    Posts:
    5
    so... where is the addressable downloaded folder(asset bundle cache folder), nobody knows?
     
    Last edited: Aug 13, 2018
  31. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    3,510
  32. sxmad

    sxmad

    Joined:
    Nov 4, 2014
    Posts:
    5
    karl_jones likes this.
  33. inZania

    inZania

    Joined:
    Mar 3, 2016
    Posts:
    28
    The Google Doc references "Advanced Packed Content Group" which appears to allow customization of the load method. However, with version 0.2.2-prelease (same version referenced in the doc) I see no such option. When I "create new group" I have only the "packed content group" option (unlike the "groups" screenshot in the doc which shows three completely different options). When I select a group, there is no "load method" option (I have Build Path, Load Path, Bundle Mode, and Priority).
     
  34. RazaTech

    RazaTech

    Joined:
    Feb 27, 2015
    Posts:
    169
    Hello!!

    How about managing remote textures ?

    While watching Unite Berlin 2018 - New Addressable Asset system for speed and performance this video when he was telling about ref counts, it struck me .I am using this ref count manually for about 2 years to manage texture, Is there any we can use it over here ?

    remote textures means textures placed on server or on local drive , which have to load manually using web request.
    for example RSS reader.or in game chat.

    I will appreciate if we can use addressable assets for managing textures too.

    Thanx :)
     
  35. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    121
    Using 0.2.2 update Addressable tab does not show on prefab but works for 0.2.1. Im on Unity 2018.2.3f1
     
  36. luizbeneton

    luizbeneton

    Joined:
    Apr 8, 2013
    Posts:
    15
    I'm migrating a personal project to test Addressables. I used to have my own Object Pool solution for this project, so I decided to stick with it and use Addressables to load the prefabs only.

    To my surprise, the instances I create using my pool are null when I do a Scene load.
    Is this behaviour intended?
     
  37. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    955
    Do you mean the checkbox? As noted here https://forum.unity.com/threads/release-announcements-and-notes.543537/, that had to be temporarily removed. If you are referring to a prefab not properly showing up in the addressables window, then I'd need more context. Please make a new thread to help explain things if there is an in-window issue.
     
    karl_jones likes this.
  38. unity_bill

    unity_bill

    Unity Technologies

    Joined:
    Apr 11, 2017
    Posts:
    955
    hmm. Perhaps you are attempting to instantiate objects in the pool before the async load call has finished? I'd need some additional details to really see what might be going on. Can you start a new thread on this forum so we can have a focused conversation?

    Thanks,
    Bill
     
    karl_jones likes this.
  39. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    121
    Super excited about this new addition!!
    I tried the demo attached to the Addressable Asset System Getting Started (https://drive.google.com/file/d/19LlNLqMa9ZEJgjLogWcWxRsTvhHGU191/view) . There are no Addressable Assets in the Addressable Assets window and can't right click to create a group, hence demo does not work. I'm using Unity 2018.2.3f1 and0.2.2 thought I also tested the different Addressable Asset packages. I note I can create groups and Addressable Assets outside this demo.

    What I'm trying to do is post-release change the fbx and textures of an existing local addressable asset so that they get updated without having to release the app again. I can get it to work local but I'm a fool after all the reading and videos watched and can't remote. If I set an asset in the remote group, the asset doesn't get updated if I change it in the server. Can someone share some light how this is done?

    - Remote Packaged Content Group: the Addressable Assets Getting Started doc says to download the assets from a URL via a UnityWebRequest. Is UnityWebRequest required in the script in addition to setting the UI Remote Packed Group Load path to the url?

    - What is the Remote build path , path to the app in the app store? Running on the editor, Remote build and load paths reset back to local after pressing play (though I saved the scene).

    - What do I need to upload to remote? I tried adding the address to the new fbx/textures by adding them to the Addressable Assets Window, build again and then upload catalog_packedMode.json, catalog_1.json, catalog_1.hash generated in streamingAssets/com.unity.addressables/standaloneWindows64 and also uploaded the new fbx/textures after this second build. What are the steps?

    An example available to follow the steps would be sooo handy! Can't find remote setup anywhere for Addressable Assets in the demo/forums/google.


    Thank you for your help, Sergio
     
    Last edited: Aug 22, 2018
  40. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    59
    I have a project for a customer and I really really want to use the addressable system. it is very simple and intuitive. I am using the Unity 2018.2.0 and the latest version of the package (0.2.2). however it seem that there is some issues with this release, the addressable checkbox has been removed from the inspector, and I cannot set my BuildPath and LoadBath for my Remote Group because they always fallback to the LocalBuildPath. I don't know when this should be corrected, and if this system is ready to be used in production (I can take the risk to update my code every time this system get updated)
     
  41. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    389
    I already made a post about the settings falling back to default. The inspector thing they actually announced that it is disabled.

    Golden tip, don't use preview packages for releases because it is for preview not release. Yes it is simple, yes it is intuitive thats what Unity tries to go for. But no, it is not ready for release yet. Preview is the same as beta, sure you can use it, but at your own risk because it can contain bugs. Preview is for trying out, reporting bugs etc. Not really release material.
     
    AAK_Lebanon likes this.
  42. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    59
    The Problem is that it seems that these "Preview" packages does never go out of preview !
     
  43. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    389
    I'd love to see them accelerate their development with both the Addressable Asset system but also Nested Prefabs. These are my 2 most wanted features. There are still quite some bugs to be splat and features to be released. Hopefully more emphasis on the bug splatting at some point to make the Addressable Asset System more usable than in its current state. I am referring to resetting the group settings constantly on domain reload. I've pretty much changed the code to make the default be what most of my groups need. I would've fixed the issue myself if I knew what the problem was. Though the code is somewhat complex, it would take me a lot of time to go through all the code necessary.
    It probably has something to do with deserializing the groups but I am uncertain what goes wrong there. Since the .asset file in text has the right values, upon domain reload it is still resetted to default and serialized values are ignored.

    Aside from that I'd love to see what WebGL WebAssembly Multithreaded support will deliver for performance. I hope for less main thread blocking.
    But yeah, all we can do is wait and be patient :)
     
  44. fdsagizi2

    fdsagizi2

    Joined:
    Nov 4, 2013
    Posts:
    69
  45. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    59
    I have also another question: it seems that the build button is disabled in the Addressables window . I don't know why this button exist, it is the preferred solution to build bundles to deploy them to the internet ? and what should I do now to build my bundles every time I make a modification ? should I remove them to another project and build them there or simply rebuild my project ? I am asking because my project consist of a 'Main Project' that download content for each scene. so I create a new scene for each customer, and that scene should be packed into bundle and deployed to the internet. I don't know what is the best workflow to me.
     
    Last edited: Aug 24, 2018
  46. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    121
    I find preview helpful to see dependencies
     
    AAK_Lebanon likes this.
  47. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    59
    Sorry I deleted my question (Edited my post) before I see your answer.
     
  48. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    59
    Actually after playing with the system, I have another kind of question and I don't know if this is the right place to ask it.
    my application act as an AR viewer, so when I turn the camera to something (a target image that represent a specific customer), it will load an augmented scene that will be loaded in additive mode. the augmented scene is related to a specific customer. So let's say that I have 1000 customers, and for each customer, I will create a sub-folder in my project's assets folder, where there is a scene that represent the customer scene and other objects related to the scene (materials, models, etc...). I marked the scene as addressable and now I am able to load the scene from a remote location, and I am able to update the customer scene and replace the generated bundles with the old one (by re-building my entire project again, and I don't know if there is a more smooth solution) however how I should handle the other customers workflow ? should my project end-up with 1000 sub-folders for each customer ?!
     
  49. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    59
    I have discovered something that I want to share it here. I am using the Scriptable Objects as Events Like described in this video:


    So when I mark a scene as addressable (by dragging it to my Remote Group, cause there is no other way in the last package 0.2.2) this will include every referred asset in the bundle automatically and I love this feature. however the Scriptable Assets will not be included ! and maybe because it is not directly referred in the scene, I don't know really.

    However, I discovered that if I simply drag my scriptable object file (an event as described in the video above) to my Remote Group in the Addressables window, my remote scene will work without any problem ! I love that, everything happen automatically but I don't know why :)
    I though that I cannot benefit from assets that are marked as Addressable if I don't call them from the Addressables API.
    I hope that the next version will not broke that feature.
     
  50. Abd92

    Abd92

    Joined:
    Jan 4, 2016
    Posts:
    5
    Hi,
    I am trying to instantiate gameobject using addressables.instantiate , but I can not save the instantiation result in a variable to use it later, even though I am using IAsyncOperation.Result but that does not help
    Code (CSharp):
    1.         public List<GameObject> gos = new List<GameObject>();
    2. void Start()
    3.     {
    4.         Addressables.LoadAssets<IResourceLocation>(cubeLabel.labelString, null).Completed += instantiateCube;
    5.     }
    6.  
    7.     void instantiateCube(IAsyncOperation<IList<IResourceLocation>> asyncOperation)
    8.     {
    9.         models = new List<IResourceLocation>(asyncOperation.Result);
    10.         for (int i = 0; i < models.Count; i++)
    11.         {
    12.             IResourceLocation model = models[i];
    13.             GameObject go = Addressables.Instantiate<GameObject>(model).Result;
    14.             gos.Add(go);
    15.         }
    16.     }
    the result always returns null