Search Unity

Addressables are here!

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

Thread Status:
Not open for further replies.
  1. audrey-unity

    audrey-unity

    Joined:
    Jan 4, 2018
    Posts:
    11
    The Addressable Asset System is an 18.2 Package that includes Addressable Assets, Resource Manager, and the Scriptable Build Pipeline. Addressables provide an easy way to load assets by “address”, handling asset management overhead and simplifying content pack creation & deployment.

    Once an asset is marked "addressable", the addressable asset can be called from anywhere. Whether that addressable asset resides in the local player or on a content delivery network, the system will locate and return it. You can load a single addressable via its address or load many addressables using a customized group label that you define. Check out the Addressable Asset System - Getting Started for details on how to get up and running!

    Attending Unite Berlin? Come see our talk: New Addressable Asset System for Speed and Performance - Tuesday June 19th @ 9am in Breakout 2.
     
  2. audrey-unity

    audrey-unity

    Joined:
    Jan 4, 2018
    Posts:
    11
    Interested in checking out the New Addressable Asset System for Speed and Performance talk from Unite Berlin?

    The New Addressable Asset System for Speed and Performance is the first video (1 hour). Check it out!

    Here is a YouTube video of all of the sessions,
    Unite Berlin - Day 1 Sessions Livestream.
     
  3. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,334
    at about 3:50, he says something along the lines of "you can restrict which types of assets go in there". Do you have any information on that? I can't spot anything in the docs.

    This looks really great, I've been excited about it since you first announced it.
     
  4. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Hi Baste, we have no docs for this yet :(, but I'll give a short description here. There are currently two main restrictions possible. Type and Label. Label meaning, it'll only accept things that are already addressable and have a given label. Type meaning, they match a type. Due to serialization limitations, the type restriction can't be done as a template, but is done through specific classes (such as AssetReferenceGameObject). Take a look at the package code in Runtime/AssetReference.cs for more info.
     
    dadude123 likes this.
  5. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    Hey,

    This is a great looking system, however I am having trouble to understand how a particular case I have will work.
    Is it possible to have an addressable asset packed with the build (streaming assets) and also have it remote at the same time?
    In case the online content is updated it should download those bundles instead of the streaming assets one.

    If it is possible, how can I achieve that? because it seems I can only configure it to either be local or remote but not both.
     
  6. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    There are two ways to solve this. One could be be to create a custom group processor and custom provider. The group would just inherit from the standard remote one, and do a post-build copy of the bundles so they are in both places. The provider would do a runtime check to see if local matches remote, and download remote if not.

    That isn't our intended solution to this problem however. In this system we have a content catalog that maps all addresses to assets. Our system already handles checking to see if a newer catalog is on a remote server. So our intended solution here is to have your initial build only contain the data locally. Then, on update you would move your changed assets to be remote. The new catalog would have all those addresses point to the remote bundle(s) instead of the local. This can be done manually today. We intend to add a feature in the future that would automatically compare updates against the published build and detect "local assets have changed" so you can safely update.

    Thanks for your input,
    Bill
     
    MaskedMouse likes this.
  7. Kirsche

    Kirsche

    Joined:
    Apr 14, 2015
    Posts:
    121
    Very nice work! This new system is so much better than using AssetBundles. I wonder if it can solve this?

    Imagine a compiled/built game and a second project called "Game SDK". The SDK project would contain a few useful editor scripts that make is easy to create mods.

    (I've already experimented a bit) For the SDK I've added a "Local packed content" with a simple text file in it. Once the SDK project is compiled, there appear four new files in the StreamedAssets folder:

    catalog_1.hash
    catalog_1.json
    mypackage.bundle
    defaultlocalgroup.bundle

    However I can't simply copy them over to my game as there already exist files under the same names. So I tried renaming the index(?) suffix from "1" to "2" and ignore the defaultlocalgroup (as it's empty anyway) but it doesn't work. IAsyncOperation finishes with status code "Failed".

    What should I do?
     
  8. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi,

    1) are Addressables able to operate with scenes? When moving the game-player through different areas of the game-world I currently load several sceens that contain geo, colliders and textures asynchronously in real time.

    If yes, and Addressables = sceens are stored with the build locally, do I have any loading or performance advantage in this case... instead of loading scenes in the common asynchronous way?

    Win PC builds.
    2) Does the Addressables use any security system by default?
    A) Think about to infiltrate the data stream by wire shark https://www.wireshark.org/ to manipulate the addressable package while send to or receive from the server. Perhaps receiving a Addressable data package that compares the user serial with serials on the server, or counting how often the user have installed the player. Or to prevent manipulate game content for league multiplayer games?

    Further when downloading an Addressable package from the remote server, is there any way to define a login on the remote server to prevent flooding by hackers using the same address from where the package has downloaded?

    3) Would it possible to send Addressable packages to a server as well? Eg game stats? User build content? The most games store their user stats to the company game server.

    4) Is there any API to build Addressable packages by script and send to a remote server at run time? And load them back on requirement?



    Thank you.
     
    Last edited: Jun 26, 2018
    Walter_Hulsebos likes this.
  9. LouisHong

    LouisHong

    Joined:
    Nov 11, 2014
    Posts:
    69
    Why is Host button is missing from the 0.1.2 editor, also I cannot build because the build button is grayed out.



    edit:
    ok...
     
    Last edited: Jun 26, 2018
    codestage likes this.
  10. codenamesimon

    codenamesimon

    Joined:
    Jul 2, 2013
    Posts:
    4
    Hey.

    How does the Addressables work with content delivery when content is not known at build time?

    Currently, we're using remote config + remote server asset bundles for delivering new levels, shop content and all special offers/marketing assets for timed offers in-game. All of those are not know at build time, but they can always be built as additional asset bundles and with few modifications in our remote config we can make the content appear in the game.

    It seems to me though, that all the guids and paths with Addressables system need to be known at build time, and there is no way to add new content w/o updating the Addressables database which equals to creating a new build.

    Is that correct, or is there a way to implement dynamic content delivery with Addressables too?
     
  11. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    if you have a level loader addressable that can be updated to load more additional content wouldn't that be a solution?
    So basically an update-able wrapper around it?
    The system should pick up the new catalog on the remote server without having to rebuild your game.
     
  12. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    I'm going to attempt to tinker with this anyway, but is it safe to load Addressable Scriptable objects during a RuntimeInitializeOnLoad() marked function? I'm interested in setting up system configuration data for ECS.
     
  13. OLGV

    OLGV

    Joined:
    Oct 4, 2012
    Posts:
    57
    Can you create/pack/generate addressable assets at runtime?
    Example: you are able to generate content and upload to a server for another user to download at the other end.
     
  14. codenamesimon

    codenamesimon

    Joined:
    Jul 2, 2013
    Posts:
    4
    Thanks for the replies.

    So basically yes, we could do that, but it's not what we want. On mobile, the transfer and storage is a premium, and doing it this way would basically increase the size of the package to download by the user, and force it to redownload entire content package (containing also the levels the user already has) every time there is a change or new content.
     
  15. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    Why not build them into seperate packages? Instead of 1 big bundle of levels, have 1 bundle per level. Thats what bundle dependencies are for.

    An adressable containing the level loader
    The level loader contains a list of addressables of levels to load?
     
  16. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,609
    If 'level' refers to an Unity Scene, then this is actually the only way possible. Unity allows to store one Scene per asset bundle only.
     
  17. frvalet

    frvalet

    Joined:
    Sep 12, 2017
    Posts:
    1
    Nice work there... But, looking at the Scriptable Build Pipeline and the new addressable, while reading the App Store guidelines, a question comes to my (twisted) mind : doesn't these remarquable new functionalities provide a pandora box making the application incompatible with Apple guidelines (2.5.2) :
    "nor may they download, install, or execute code which introduces or changes features or functionality of the app"

    I know... Paranoia is my middle name :)

    Reference : https://developer.apple.com/app-store/review/guidelines/#software-requirements
     
  18. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    with addressables you can only update assets not code
    For code changes you still need a new build as far as I know
     
    iwillbenice and frvalet like this.
  19. henkjan

    henkjan

    Joined:
    Aug 1, 2013
    Posts:
    146
    Is the Addressable Asset System working together with Unity Build Cloud? So can Unity Build Cloud build the asset bundles for me that are assigned using the Addressable Asset System?

    Another question: In our current game I made an asset bundle preloader before entering (loading) a new scene. The set of asset bundles depends on the level to load. So it's determined at runtime.
    Is this setup possible using the Addressable Asset System? Can I preload a group? Or what is the right way to cope with this?
     
    Last edited: Jul 10, 2018
  20. David_GameDev

    David_GameDev

    Joined:
    Dec 25, 2016
    Posts:
    29
    Is it possible to cache the content the player has loaded once? So basically, he loads the content he needs from a remove storage, but then caches it locally and loads it the next time from the local storage instead of downloading it, something like the "LoadFromCacheOrDownload"?
     
    Last edited: Jul 11, 2018
  21. PaulBurslem

    PaulBurslem

    Unity Technologies

    Joined:
    Oct 7, 2016
    Posts:
    79
    @henkjan - There is no reason that it would not work with Cloud Build as the data is generated during the normal build process. That being said, we probably have some more testing in this area to do so thanks for the reminder :)
    Addressables.PreloadDependencies will download (and load) dependencies of any addressable. It also supports labels and collections of addresses to easily trigger the preload of a number of dependency sets

    @David_GameDev - Yes, the bundles use the existing caching system and will check the local cache first. The location data for bundles contains the crc & hash that are passed in to the UnityWebRequestAssetBundle.GetAssetBundle call.
     
    henkjan and David_GameDev like this.
  22. PaulBurslem

    PaulBurslem

    Unity Technologies

    Joined:
    Oct 7, 2016
    Posts:
    79
    Actually it is possible to have multiple scenes in a bundle. The only restriction is that it can contain ONLY scenes and not a mix of scenes and non scene assets.
     
    hopeful and Peter77 like this.
  23. MaulikKaloliya

    MaulikKaloliya

    Joined:
    Sep 28, 2012
    Posts:
    12
    Hi

    I am using Addressable Asset System ("com.unity.addressables": "0.1.2-preview") with Unity 2018.2.0f2 and i am getting
    some of errors and when opening Addressables window and also got issue while reloading preview

    As well as build button is also not enabled for building asset bundles see attached screen shot
    Screenshot_3.png
    Error
    Build preview failed: UnsavedChanges
    UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)
     
    Last edited: Jul 12, 2018
  24. waterbearpaul

    waterbearpaul

    Joined:
    May 23, 2017
    Posts:
    5
    Hello,

    I want to add a progress bar showing the progress of LoadAssets.
    I tried this :

    Code (CSharp):
    1.  
    2.     public List<string> AssetsToLoad;
    3.     private IAsyncOperation<IList<GameObject>> async = null;
    4.  
    5.     void Start ()
    6.     {
    7.         async = Addressables.LoadAssets<GameObject>(AssetsToLoad, (op2) => {
    8.             Debug.Log("...");
    9.         });
    10.  
    11.         async.Completed += (op) => {
    12.             async = null;
    13.             Debug.Log("Loading Complete!");
    14.         };
    15.     }
    16.  
    17.     void Update()
    18.     {
    19.         if (async != null)
    20.         {
    21.             Debug.Log(async.PercentComplete * 100 + " %");
    22.         }
    23.     }
    24.  
    I lowered the bandwidth of my file server down to 1Kb/s to be able to see the change.
    All I get is a lot of "0%", and finally "100%". Also, I never get my "...".

    What is the proper way to get a value of progress ?
     
    florianhanke likes this.
  25. Shivanshu_Kant_Prasad

    Shivanshu_Kant_Prasad

    Joined:
    Jul 12, 2018
    Posts:
    1
    Can the resource manager load assets from hard disk(Streaming Assets)? it can be useful for mod support.
    Currently we have to write custom loader using WWW to do this and manually manage memory and other stuff.
    It would be really nice to have this functionality in it so that we don't have to manage two resource loading methods.
     
  26. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Yes. By default, Addressables are already stored in StreamingAssets. If modders wanted to add new files they would just need to alter the manifest json data so that they can be discovered by the Addressables system

    Also this https://forum.unity.com/threads/modding-with-addressables.539926/
     
    Last edited: Jul 12, 2018
    Shivanshu_Kant_Prasad likes this.
  27. ldhongen1990

    ldhongen1990

    Joined:
    Dec 18, 2015
    Posts:
    61
    I am using 18.2.0f2 with new Addressable Asset.

    I tried loading a scene, but apparently the lightmap is all messed up.
    I have already clear and rebaked it.
    I am using the progressive lightmapper.
    Seems like it only occur if I load the scene as an addressable asset.

    I am on the android platform.
    The baked lightmap worked as normal if I built and included the scene in the apk without loading it as a remote addressable asset.
     
    rigidbuddy likes this.
  28. ReynV

    ReynV

    Joined:
    Sep 24, 2014
    Posts:
    50
    I'm using unity 2018.2.0f2 and version 0.1.2 of the addressable package.

    I really want to get addressables working, I have unexplained lockups with asset bundles. (iOS hangs with zero feedback)

    1. I have what looks like a shader issue with my addressables test.

    When I create a new project and load an addressable scene through code it loads correctly, a red material shows up on a plane. However, when I try the same thing on my large project for some reason the plane shows up as pink. I tried explicitly including the material in the group but it doesn't help.

    I have play mode as packed in my test and large projects. I am only testing in the editor.

    2. I have a couple of addressables related errors showing up. I have reported them, the feedback is that they know about those issues and that I should use 0.0.27 in the mean time, unfortunately I have even more issues with that version. The errors seem to disappear after restarting unity.

    3. I would also like to know why the build button is grayed out.

    4. Why are groups broken into *_assets_all.bundle and *_scenes_all.bundle files ?

    5. I want to download bundles and load them dynamically. Am I going to have to update the catalog_1.json (?) file at runtime ? With the current assetbundles I can download the bundle, load the bundle then load the scene from it. How would this process work with addressables ?

    Thanks!
     
  29. Allan-Smith

    Allan-Smith

    Joined:
    Feb 7, 2012
    Posts:
    57
    Hi! I've just imported the package, selected one prefab which I was referencing directly, checked Addressable, opened the Window->Addressable Assets, and am getting this NRE:


    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.AddressableAssets.AddressableAssetEntry.GatherAllAssets (System.Collections.Generic.List`1 assets, Boolean includeSelf, Boolean recurseAll) (at C:/Users/amich/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Editor/Settings/AddressableAssetEntry.cs:276)
    3. UnityEditor.AddressableAssets.AddressableAssetEntryTreeView.AddAndRecurseEntriesBuild (UnityEditor.AddressableAssets.AddressableAssetEntry entry, UnityEditor.AddressableAssets.AssetEntryTreeViewItem parent, Int32 depth) (at C:/Users/amich/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:593)
    4. UnityEditor.AddressableAssets.AddressableAssetEntryTreeView.AddGroupChildrenBuild (UnityEditor.AddressableAssets.AddressableAssetGroup group, UnityEditor.IMGUI.Controls.TreeViewItem root) (at C:/Users/amich/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:583)
    5. UnityEditor.AddressableAssets.AddressableAssetEntryTreeView.BuildRoot () (at C:/Users/amich/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:420)
    6. UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.FetchData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControlDataSource.cs:53)
    7. UnityEditor.IMGUI.Controls.TreeViewDataSource.ReloadData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewDataSource.cs:53)
    8. UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.ReloadData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControlDataSource.cs:25)
    9. UnityEditor.IMGUI.Controls.TreeViewController.ReloadData () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewController.cs:285)
    10. UnityEditor.IMGUI.Controls.TreeView.Reload () (at C:/buildslave/unity/build/Editor/Mono/GUI/TreeView/TreeViewControl/TreeViewControl.cs:103)
    11. UnityEditor.AddressableAssets.AddressableAssetsSettingsGroupEditor.OnGUI (Rect pos) (at C:/Users/amich/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs:310)
    12. UnityEditor.AddressableAssets.AddressableAssetsWindow.OnGUI () (at C:/Users/amich/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Editor/GUI/AddressableAssetsWindow.cs:134)
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    14. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    15. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    16. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    17. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
    18. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
    19. UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)
    20. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    I've disabled some of the core packages, but nothing that seems to be anyway related to an editor window?
    Any ideas? Btw using Unity 2018.2.0f2, windows 64.
     
    mf_andreich likes this.
  30. Allan-Smith

    Allan-Smith

    Joined:
    Feb 7, 2012
    Posts:
    57
    Also got some other questions about the system in general:

    1- On another project we had to take a HUGE amount of time to organize the whole project into using asset bundles properly, to completely avoid asset duplication while building the asset bundles and stuff like that. The demos you guys show basically have you putting prefabs as addressables and you leave it at that. Would this mess up assets the same way as asset bundles would? Say prefab1 and prefab2 both use texture1, would texture1 be copied to both asset bundles, if both prefabs are marked "addressable" but the texture is not? In this scenario, do I just mark the texture as addressable as well, generate 3 bundles, and I leave the dependency downloading/checking/etc to the addressable system?

    2- Does the system offer a way for me to show how many MBs a certain asset is? say I want to show a loading bar with the size of the assets, if they are coming from the web... is this I could easily fetch out of the box?

    3- Finally, how does addressables play with Apple's On Demand Resources?

    By the way, this is probably the system that got me most excited about Unity for a long time hahah this was just hell to work with and this system looks just great, can't wait to effectivelly try it out, so good job guys, tackling the real problems here =P

    Thanks!
     
    CharBodman and tealm like this.
  31. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Hi @karl_jones, do u mean the Addressables information build from Addressables editor window? I have the use case that I need to change address name, label and prefab frequently then build new asset bundles without needing to rebuild the whole mobile game. So, my mobile game can still load the prefab or asset that I want even the address name has been changed without rebuilding the game. The thing I want is able to move out Addressables information from StreamingAssets to CDN so I can update Addressables information just like the old asset bundle system that will build the asset bundle and asset information together as manifest file.
     
  32. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Y
    Yes you can configure where the assets are stored. By default its StreamingAssets but it can just as easily be a web server or somewhere else. Its part of the settings in the editor window and can also be customized with scripts.
    Looks at the Remote Packed Content Group for further details and read the docs ;)
     
    optimise likes this.
  33. WayneC

    WayneC

    Joined:
    Jan 15, 2016
    Posts:
    13
    I'm looking at the Package Manager and can't find Addressable Asset System. Any idea?
     

    Attached Files:

  34. Allan-Smith

    Allan-Smith

    Joined:
    Feb 7, 2012
    Posts:
    57
    While I believe in 2018.2 it should be available from what they said, you still need to edit the manifest file:

    Code (CSharp):
    1. Step 2: Edit your Packages/manifest.json.
    2. {
    3.     "dependencies": {
    4.         "com.unity.addressables": "0.1.2-preview"
    5.     }
    6. }
    7.  
     
    Wolfram and WayneC like this.
  35. mf_andreich

    mf_andreich

    Joined:
    Jul 7, 2017
    Posts:
    38
    I have the same issue... You dont find workaround?
     
  36. androshchuk-vladyslav

    androshchuk-vladyslav

    Joined:
    Dec 13, 2015
    Posts:
    127
    Hi @karl_jones. How I should download assets from server? I need to configure provider? Will be very thankful. And how I should build this for server?
     
    Last edited: Jul 17, 2018
  37. Allan-Smith

    Allan-Smith

    Joined:
    Feb 7, 2012
    Posts:
    57
    I ended up solving it by re-activating everything in the package manager (the default packages). I'm not sure which package was causing the error and the error itself is not informative in any way... but that solved it for me.
     
  38. Havokki

    Havokki

    Joined:
    Jun 28, 2015
    Posts:
    118
    Thanks for the solution! For me re-activating the Video package fixed it.
     
    Allan-Smith likes this.
  39. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
  40. takumi-shimomura

    takumi-shimomura

    Joined:
    Jan 12, 2016
    Posts:
    3
    I want to know how to use custom provider too.
    I have created the `Advanced Packed Content Group` according to the manual.
    But, i can't found `Load Method` dropdown group. (with version 0.1.2-preview)
     

    Attached Files:

    Mutode likes this.
  41. imurashka

    imurashka

    Joined:
    Aug 5, 2012
    Posts:
    20
    Hello! I tryed to build PC build with very simple logic (just to test)
    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.AddressableAssets;
    3.  
    4. public class Loader : MonoBehaviour
    5. {
    6.     private void Start()
    7.     {
    8.         float offset = -m_boxes.Length * 0.5f + 0.5f;
    9.         foreach (var asset in m_boxes)
    10.         {
    11.             asset.Instantiate<GameObject>(new Vector3(offset, 0), Quaternion.identity);
    12.             offset += 1;
    13.         }
    14.     }
    15.  
    16.     [SerializeField]
    17.     private AssetReference[] m_boxes = new AssetReference[0];
    18. }
    19.  
    After build ran I got this error:
    Code (csharp):
    1. Exception: Unable to load runtime data.
    2.   at UnityEngine.AddressableAssets.InitializationOperation.OnDataLoaded (UnityEngine.ResourceManagement.IAsyncOperation`1[T] op) [0x00011] in C:\Users\Ivan\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.addressables@0.1.2-preview\Runtime\InitializationOperation.cs:29
    3.   at UnityEngine.ResourceManagement.AsyncOperationBase`1[TObject].InvokeCompletionEvent () [0x00031] in C:\Users\Ivan\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.resourcemanager@2.1.0-preview\Runtime\AsyncOperations\AsyncOperationBase.cs:208
    4. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    5. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    6. UnityEngine.Logger:LogException(Exception, Object)
    7. UnityEngine.Debug:LogException(Exception)
    8. UnityEngine.ResourceManagement.AsyncOperationBase`1:InvokeCompletionEvent() (at C:\Users\Ivan\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.resourcemanager@2.1.0-preview\Runtime\AsyncOperations\AsyncOperationBase.cs:212)
    9. UnityEngine.ResourceManagement.InternalProviderOperation`1:OnComplete() (at C:\Users\Ivan\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.resourcemanager@2.1.0-preview\Runtime\AsyncOperations\InternalProviderOperation.cs:51)
    10. UnityEngine.ResourceManagement.InternalProviderOperation`1:OnComplete(AsyncOperation) (at C:\Users\Ivan\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.resourcemanager@2.1.0-preview\Runtime\AsyncOperations\InternalProviderOperation.cs:44)
    11. System.Reflection.MonoMethod:InternalInvoke(MonoMethod, Object, Object[], Exception&)
    12. System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
    13. System.Reflection.MethodBase:Invoke(Object, Object[])
    14. System.Delegate:DynamicInvokeImpl(Object[])
    15. System.MulticastDelegate:DynamicInvokeImpl(Object[])
    16. System.Delegate:DynamicInvoke(Object[])
    17. UnityEngine.ResourceManagement.DelegateInfo:Invoke() (at C:\Users\Ivan\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.resourcemanager@2.1.0-preview\Runtime\Util\DelayedActionManager.cs:45)
    18. UnityEngine.ResourceManagement.DelayedActionManager:LateUpdate() (at C:\Users\Ivan\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.resourcemanager@2.1.0-preview\Runtime\Util\DelayedActionManager.cs:157)
     
  42. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Does it work inside the editor?
    What platform did you build to?
     
  43. robinfischerinnogames

    robinfischerinnogames

    Joined:
    Apr 7, 2017
    Posts:
    13
    I like where this is going but I have a question. Wouldn't it be the 'right' thing to also have 'direct scene references' as addressable assets? For example: The SpriteRenderer component has a Sprite Object reference field. With the addressable system I cannot just say: Hey this Sprite used in this scene by this SpriteRenderer, I want to have it in an asset bundle and let it live on the CDN. I first have to attach a component to the GameObject that references the Addressable Sprite asset and then assigns it to the SpriteRenderer component on Awake.
    If all Unity components that need asset references would support addressable assets we could really start at the asset level to optimize our asset setup. How the system is setup now it only is usable for runtime instantiated assets.
    At scene load the addressable system could load all assets that are 'referenced' to the scene for example in our SpriteRenderer through the addressable system since it already is an async operation.
    Just a thought I had, what do you think?
     
  44. mf_andreich

    mf_andreich

    Joined:
    Jul 7, 2017
    Posts:
    38
    I have the the same Issue. In editor all works (but after build I need add something into addressables, launch scene and remove this asset after this, in other case addressables doesnt works). I try build my app for Windows x64 using Unity 2018.2.0f2.
     
    Last edited: Jul 20, 2018
  45. Cuku_

    Cuku_

    Joined:
    Sep 2, 2012
    Posts:
    11
    Hi, I was testing in Editor loading a ScriptableObject and everything was fine, until I made a build and now doesn't work anymore.

    I get this message:

    Code (CSharp):
    1. Unable to load remote catalog hash: .
    2. UnityEngine.AsyncOperation:InvokeCompletionEvent()
    and this error:

    Code (CSharp):
    1.  
    2. ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    3. Parameter name: index
    4. System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <f826c2584fc94ec19a48a6576640bdc5>:0)
    5. System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <f826c2584fc94ec19a48a6576640bdc5>:0)
    6. System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <f826c2584fc94ec19a48a6576640bdc5>:0)
    7. UnityEngine.AddressableAssets.InitializationOperation.LoadContentCatalog (UnityEngine.AddressableAssets.ResourceManagerRuntimeData rtd, System.Int32 index) (at C:/Users/userName/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Runtime/InitializationOperation.cs:50)
    8. UnityEngine.AddressableAssets.InitializationOperation+<LoadContentCatalog>c__AnonStorey0.<>m__0 (UnityEngine.ResourceManagement.IAsyncOperation`1[T] op) (at C:/Users/userName/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Runtime/InitializationOperation.cs:73)
    9. UnityEngine.ResourceManagement.AsyncOperationBase`1[TObject].InvokeCompletionEvent () (at C:/Users/userName/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.resourcemanager@2.1.0-preview/Runtime/AsyncOperations/AsyncOperationBase.cs:208)
    10. UnityEngine.ResourceManagement.DelayedActionManager:LateUpdate()
    11.  
     
  46. imurashka

    imurashka

    Joined:
    Aug 5, 2012
    Posts:
    20
    Sorry for missing details.
    1) Unity version - 2018.2.0f2
    2) Addressable System version - 0.1.2
    3) In editor everythig is fine and code works as expected
    4) I tryed windows build and got ptoblem (log in previous message)
    And there is project https://www.dropbox.com/s/iu07d1d4ddcas7c/AddressableDemo.zip?dl=0
     
    Last edited: Jul 20, 2018
  47. androshchuk-vladyslav

    androshchuk-vladyslav

    Joined:
    Dec 13, 2015
    Posts:
    127
  48. MaskedMouse

    MaskedMouse

    Joined:
    Jul 8, 2014
    Posts:
    1,092
    if you're using remote groups, you can define where the bundles will be built and where they are downloaded from. When building the player it should build the asset bundles as well. There will be a catalog.json & your asset bundle(s) in that folder you specified in the settings of the remote group. That folder you put on your server to host where you configured it to be downloaded from. Quite simple.
     
  49. mizushino

    mizushino

    Joined:
    Dec 9, 2015
    Posts:
    4
    I have the same problem.
    I feel like I came from "2018.2.0f2".

    Unity version - 2018.2.0f2 (Windows)
    Addressable System version - 0.1.2

    Code (CSharp):
    1. Exception: Unable to load runtime data.
    2. UnityEngine.AddressableAssets.InitializationOperation.OnDataLoaded (UnityEngine.ResourceManagement.IAsyncOperation`1[T] op) (at C:/Users/*/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.addressables@0.1.2-preview/Runtime/InitializationOperation.cs:29)
    3. UnityEngine.ResourceManagement.AsyncOperationBase`1[TObject].InvokeCompletionEvent () (at C:/Users/*/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.resourcemanager@2.1.0-preview/Runtime/AsyncOperations/AsyncOperationBase.cs:208)
    4. UnityEngine.ResourceManagement.DelayedActionManager:LateUpdate()
    Code (CSharp):
    1. Exception thrown in DynamicInvoke: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Exception: Unable to load runtime data.
    2.   at UnityEngine.AddressableAssets.InitializationOperation.OnDataLoaded (UnityEngine.ResourceManagement.IAsyncOperation`1[T] op) [0x0000e] in C:\Users\*\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.addressables@0.1.2-preview\Runtime\InitializationOperation.cs:29
    3.   at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
    4.   at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <f826c2584fc94ec19a48a6576640bdc5>:0
    5.    --- End of inner exception stack trace ---
    6.   at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <f826c2584fc94ec19a48a6576640bdc5>:0
    7.   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <f826c2584fc94ec19a48a6576640bdc5>:0
    8.   at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <f826c2584fc94ec19a48a6576640bdc5>:0
    9.   at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <f826c2584fc94ec19a48a6576640bdc5>:0
    10.   at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <f826c2584fc94ec19a48a6576640bdc5>:0
    11.   at UnityEngine.ResourceManagement.DelayedActionManager+DelegateInfo.Invoke () [0x00002] in C:\Users\*\AppData\Local\Unity\cache\packages\packages.unity.com\com.unity.resourcemanager@2.1.0-preview\Runtime\Util\DelayedActionManager.cs:45  0 (target=UnityEngine.AddressableAssets.InitializationOperation result = False, status = None, Valid = True, canRelease = False) InitializationOperation.OnDataLoaded(UnityEngine.ResourceManagement.RawDataProvider+InternalOp`1[UnityEngine.AddressableAssets.ResourceManagerRuntimeData] result = , status = Failed, Valid = True, canRelease = False) @0
    12. UnityEngine.ResourceManagement.DelayedActionManager:LateUpdate()
     
  50. Wizcas

    Wizcas

    Joined:
    Feb 28, 2015
    Posts:
    14
    The addressable asset settings can't be loaded correctly in my editor. Exceptions are thrown as soon as I open the 'Addressables' window if setting files existed.

    Here is the screenshot:

    upload_2018-7-23_13-49-44.png

    Edited:

    Seems it's caused by the DevConsole plug-in and something in its Resources folder. After deleting them everything works now.
     
Thread Status:
Not open for further replies.