Search Unity

Addressables are here!

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

Thread Status:
Not open for further replies.
  1. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    113
    Update: actually even when I set all my asset group to be uncompressed, sometimes randomly it would take up to 2 min to load the first asset, when it's doing that the game seems to be just sitting there with very low CPU usage and low Disk usage, like 8 mb/s, then after 30 second it would just to 90 mb/s, and at it for a while before it will finish loading.... really need help, it's blocking my clients with this issue.

    Update:
    I didn't call InitializeAsync, this me try look into that.

    Update: InitializeAsync handle doesn't seem to report value in PercentageComplete, this is a problem, especially when InitializeAsync can take a while.

    Update: so InitializeAsync finished really fast, so I still can't fingure out why it's so slow in standand alone build but never slow in editor pack mode, I tried set Application.backgroundLoadingPriority = ThreadPriority.High; but still extream slow, takes 2-5 min seems like the game just not doing anything except very low harddrive reads and framerate is very high and after 2-5 min the game suddenly loads, I can't get any percentage value working during this time. my standalone build is il2cpp could it be the issue?

    Also I am getting lots of random
    Could not produce class with ID 1108.
    when running il2cpp standalone build with addressable, I deleted library many time, and this still happens.


    Update:

    I think I finally figured out, my Async Upload Time Slice and Async Upload Buffer Size was too small. it was at 2ms and 4mb, changed to bigger value, finger crossed...


    Update:

    still same slowness no matter what I do, I think it's a disk seeks issue, but I can't find any information on how to pack the data in a more optimal way, also I can't separate into smaller asset pack due to a bug in addressable that is not fixed in 2019.2.


    Update:

    sorry this becomes like a blog, but now I learned what really happens is my asset dependency are all over the place, and it's basically trying to read all the file at the same time, and sometimes it's fast because it's cached by memory or windows cache. so what I really need to do is take a closer look at packing the only thing I want to load at a time.
     
    Last edited: Sep 24, 2019
  2. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    24
    You can change group setting BundleMode from Pack Together to Pack Separately or Pack Together By Label.
     
  3. deepakguptaPR

    deepakguptaPR

    Joined:
    Aug 20, 2019
    Posts:
    12

    Hi,

    Have you able to separate the assets into different project and load addressable assets in the main project? If yes, could you please guide us in implementing the same. Thanks in advance
     
  4. Raymond-Leung

    Raymond-Leung

    Joined:
    Dec 12, 2016
    Posts:
    15
    Last edited: Sep 26, 2019
  5. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    I am using Visual Studio Community 2017 Version 15.9.11, Unity 2018.4.9f1 LTS and I can't see the documentation of any addressable class or method, even though they are documented when i navigate to them via "go to definition".

    This is how it looks when i mouse over the method from a script in the project(this is the ComponentReference example provided by unity on github)

    And this is the implementation of the method which is in the class ResourceManager which is in the UnityEngine.ResourceManagement namespace.

    notice that it is fully documented, but this documentation didn't show up in the previous screenshot where the method was used from a script that is simply located in the project folder, but it shows if i mouse over it where it is defined.

    I would like to see the documentation of the methods when i use them in my project, does anybody know how to solve this issue?
     
    Last edited: Oct 3, 2019
  6. faolad

    faolad

    Joined:
    Jan 27, 2013
    Posts:
    118
    Is there a way to Skip Updates and keep working with the old packages?

    I was struggling to come with something that can prevent this. Something like if address "my obj" pointed to one thing originally, then something new later, there is no need for this "load the new one", if the player declines the prompt at the start.
     
    Last edited: Oct 13, 2019
  7. wanorde23

    wanorde23

    Joined:
    Jan 31, 2019
    Posts:
    10

    I am having the same issue here. Seems that loading shaders that are part of a prefab is a bit of a problem ? while Ui And sprites load perfectly fine. still looking for a solution
     
  8. nicobabot

    nicobabot

    Joined:
    Jan 31, 2019
    Posts:
    1
    Hi,

    I am working on a project using Unity 2018.4.0f1, we are also using the addressable system 1.2.4 to load bundles that contain Unity scenes from our server.
    We are having an issue, when somebody updates the bundles by making a "Build for content Update" and then makes commit with this update, the other members of the group (that pull this commit) have their addressable system showing off that all the bundles have changed by only opening the project without having made any "real" change.

    The main feature of the game we are creating is that there are different worlds but the User will only start with the first one downloaded. By achieving some badges the system will download the other worlds.

    What we want to achieve is: "The User just needs to update the worlds that have changes" - Just to not make all the users update all the worlds without having changes/any real update. But with this issue we are having all the members of the project have their addressable system updating all the bundles without having any "real" changes, just by opening the project.

    pd: What I mean with "real change" is that the developer just pulls the commit and make "Prepear for content Update" and the addressable system is showing changes by just pulling the commit.

    Help please!!

    Thank You,
    Nico.
     
    phobos2077 likes this.
  9. OliverAnthony

    OliverAnthony

    Joined:
    Nov 21, 2012
    Posts:
    13
    Using 2019.2.11f1 with HDRP and Addressables and a nearly empty project (except for a rudimentary prefab, and script to instantiate that prefab through an AssetReferenceGameObject). I've been excited to try out Addressables for a long time, having used my own code for remote content management in the past.

    Before attempting to run my simple scene and validate that the prefab instantiates as expected, I am trying to execute the Build > Build Player Content command from the Addressables editor window toolbar. Unfortunately, this seems to trigger the building of countless shader variants, even though this is essentially an empty project. This is taking so long that I have yet to see the build process finish, even after waiting for several hours of 100% CPU usage (I'm sorry, laptop...).

    Is there a checklist or best practice guide I might refer to to ensure that I'm not subjecting myself (and my computer) to a longer, more exhaustive build process than necessary?

    Thanks.
     
    phobos2077 likes this.
  10. JuanMaldonado

    JuanMaldonado

    Joined:
    Oct 12, 2012
    Posts:
    30
    Hi @karl_jones
    How can I quickly create an Addressable Group Bundle that has a scene and all its dependencies, instead of dragging each asset from the project window?
     
  11. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    201
    Can someone explain to me the evaluated variables? such as
    • [PrivateIpAddress]
    • [HostingServicePort]
    These two i know what they evaluate to, but what is this for?
    • {UnityEngine.AddressableAssets.Addressables.RuntimePath}

    There are more of those, how do i know which one does what?
    How do i know which ones exist at all?
    Can i define mine?

    Some variables are within [ ] and some are within { }, why? when is one used over another?

    I am also trying to build the content locally, i copied the profile entries from this talk, but it doesn't work, it gives me an error


    My profile looks like this:

    and my group settings look like this:

    And the error is

    LoadPath for group Default Local Group is set to the dynamic-lookup version of StreamingAssets, but BuildPath is not. These paths must both use the dynamic-lookup, or both not use it.
    BuildPath: 'Assets/StreamingAssets/com.unity.addressables/[BuildTarget]'
    LoadPath: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
    UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)


    This is very confusing and there is no documentation on it. Please help.

    PS that's on version 1.2.4 of Addressables
     
    Last edited: Nov 13, 2019
    phobos2077 likes this.
  12. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    261
    I exposed a public variable in Inspector of type AssetReferenceAtlasedSprite, but can not assign a sliced atlas sprite via inspector (the drop down is empty). What gives?

    Addressables 1.3.8
    Unity 2019.2.13f1
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hey. You can do this:

    Code (csharp):
    1.  
    2. // Get the addressable settings
    3. var settings = AddressableAssetSettingsDefaultObject.GetSettings(true);
    4.  
    5. // Get the group
    6. var group = settings.FindGroup("groupName");
    7. if (group == null)
    8.     group = settings.CreateGroup(groupName, false, true, true, new List<AddressableAssetGroupSchema>(){ ScriptableObject.CreateInstance<ContentUpdateGroupSchema>() }, typeof(BundledAssetGroupSchema));
    9.  
    10. foreach (var asset in listOfAssetsToAdd)
    11. {
    12.     var assetGuid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(assetPath));
    13.     var entry = settings.FindAssetEntry(assetGuid);
    14.  
    15.     // Add the asset
    16.     if (entry == null)
    17.     {
    18.         entry = settings.CreateOrMoveEntry(assetGuid, group, true);
    19.         //entry.SetLabel() // Set any labels
    20.         //entry.address // set a custom address
    21.     }
    22. }
    To get dependencies you can use https://docs.unity3d.com/ScriptReference/AssetDatabase.GetDependencies.html or https://docs.unity3d.com/ScriptReference/EditorUtility.CollectDependencies.html
     
  14. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    261
    This happened to me when i tried to build for different platform, than what i was targeting. Make sure to switch platform to what you're building for, before you build. For example, say you are running Editor in "PC, Mac, Linux Standalone" [see what is says on top of your editor]. Now If you want to build for Android for example, first go Build Settings/Switch Platform. This will convert your shaders etc once. You might be on a different platform than what youre building your assetbundle for, which might run shader recompile for the target, as if you were switching platforms. I suggest you build your bundle/addressables switched to a platform you want to build for.

    Also, you can define what build-in shaders to compile, eg strip some of them, but i would not recommend doing so. Shaders that get compiled can be found in Project Settings/Graphics.

    I am using LightweightRenderPipeline for example, and those shaders take ~10sec to compile on platform switch. I'd assume the compilation time would mainly depend on your CPU, but i cant imagine for it to take as long as you state, in a clean project with no additional custom shaders - but then when you are actually building an asset bundle - i had this happen when i was on an incorrect platform, it might take longer(?) - who knows what actually happens there. Also check your 3rd party assets - such external plugins might use their own shaders, adding to the compile time.

    Thats all i can suggest, tho im a bit noob, so take it lightly)
     
  15. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    261
    I'm trying to async-await (C# base + plugin) on an Addressables Async operation, but am getting an error.
    @unity_bill explains in Addressables for live content management - Unite Copenhagen, that you can await on the operation returned by LoadAssetAsync. I've tried different variations, and all i get is following exception:
    Code (CSharp):
    1.  
    2. InvalidProgramException: Invalid IL code in AddressablesAsyncAwaitTest/<LoadAssetAsync>d__1:MoveNext (): IL_001f: call      0x0a000025
    3.  
    4.  
    5. System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) (at <567df3e0919241ba98db88bec4c6696f>:0)
    6. AddressablesAsyncAwaitTest.LoadAssetAsync () (at <0275aecbb97f45aa8ad4975a9879ead6>:0)
    7. AddressablesAsyncAwaitTest+<Caller>d__4.MoveNext () (at Assets/AsyncAwaitTest/AddressablesAsyncAwaitTest.cs:40)
    8. --- End of stack trace from previous location where exception was thrown ---
    9. System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at <567df3e0919241ba98db88bec4c6696f>:0)
    10. System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) (at <567df3e0919241ba98db88bec4c6696f>:0)
    11. UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:150)
    12. UnityEngine.UnitySynchronizationContext:ExecuteTasks() (at C:/buildslave/unity/build/Runtime/Export/Scripting/UnitySynchronizationContext.cs:104)
    13.  
    I have a clean project (U2019.2.13f1, Addressables 1.3.8 - all latest), with this script/code attached to scene GameObject:
    Code (CSharp):
    1. public class AddressablesAsyncAwaitTest : MonoBehaviour
    2. {
    3.     [SerializeField]
    4.     public AssetReference worldDefault;
    5.  
    6.     async Task LoadAssetAsync ()
    7.     {
    8.         await worldDefault.LoadAssetAsync<AssetReference>();
    9.     }
    10.  
    11.     IEnumerator LoadAssetAsync2()
    12.     {
    13.         var asyncOperation = worldDefault.LoadAssetAsync<TextAsset>();
    14.         yield return asyncOperation;
    15.         Debug.Log(asyncOperation.Result)
    16.     }
    17.  
    18.     void Start() {
    19.         Caller();
    20.     }
    21.  
    22.     async void Caller () {
    23.         // example 1:
    24.         // throws InvalidProgramException
    25.         await LoadAssetAsync(); // <-- line 40
    26.  
    27.         // example 2:
    28.         // using IEnumerator - works!
    29.         //StartCoroutine (LoadAssetAsync2());
    30.     }
    31. }
    32.  
    As you can see, I've also included an IEnumerator example, which works as expected. Only async-await doesnt.

    Id love to get a feedback on this, especially if @unity_bill could chime in? Appreciated.
     
    Last edited: Nov 23, 2019
  16. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    24
    This is right example:
    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Threading.Tasks;
    4. using UnityEngine;
    5. using UnityEngine.AddressableAssets;
    6.  
    7. public class AddressablesAsyncAwaitTest : MonoBehaviour
    8. {
    9.     [SerializeField]
    10.     public AssetReference worldDefault;
    11.  
    12.     async Task LoadAssetAsync()
    13.     {
    14.         await worldDefault.LoadAssetAsync<Object>().Task;
    15.         Debug.Log("Loaded");
    16.     }
    17.  
    18.     IEnumerator LoadAssetAsync2()
    19.     {
    20.         var asyncOperation = worldDefault.LoadAssetAsync<Object>();
    21.         yield return asyncOperation;
    22.         Debug.Log(asyncOperation.Result);
    23.     }
    24.  
    25.     IEnumerator Start()
    26.     {
    27.         yield return new WaitForSeconds(1f);
    28.         Caller();
    29.     }
    30.  
    31.     async void Caller()
    32.     {
    33.         // example 1:
    34.         // throws InvalidProgramException
    35.         await LoadAssetAsync(); // <-- line 40
    36.  
    37.         // example 2:
    38.         // using IEnumerator - works!
    39.         //StartCoroutine (LoadAssetAsync2());
    40.     }
    41. }
    42.  
     
    _watcher_ likes this.
  17. piojo9

    piojo9

    Joined:
    May 29, 2015
    Posts:
    10
    @_watcher_ Litovets is right. I've reported that bug to Unity (invalid code generation / invalid IL code), and they said they won't fix it. The unfortunate workaround is to not start addressable assets tasks in the first frame, or to start it with a coroutine instead of await. If there's a reason await must be used in this case, please tell me and I will reply to Unity with that information and they will reopen the bug.
     
    phobos2077 and _watcher_ like this.
  18. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    24
    Actually this example also works:
    Code (CSharp):
    1. using System.Threading.Tasks;
    2. using UnityEngine;
    3. using UnityEngine.AddressableAssets;
    4.  
    5. public class AddressablesAsyncAwaitTest : MonoBehaviour
    6. {
    7.     [SerializeField]
    8.     public AssetReference worldDefault;
    9.  
    10.     async Task LoadAssetAsync()
    11.     {
    12.         await worldDefault.LoadAssetAsync<Object>().Task;
    13.         Debug.Log("Loaded");
    14.     }
    15.  
    16.     void Start()
    17.     {
    18.         Caller();
    19.     }
    20.  
    21.     async void Caller()
    22.     {
    23.         await LoadAssetAsync();
    24.     }
    25. }
    Previous example was just working code after few iterations of fixing errors. In original author message the error was here:
    await worldDefault.LoadAssetAsync<AssetReference>();
     
    _watcher_ likes this.
  19. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    261
    Thank you so much... im not sure i would be able to figure this out by myself.
    I'd assume the wait might be necessary because of delayed/async Addressables initialization, where you have to be sure for it to have initialized. But alas, it works without it.
    Awaiting Task makes sense, but why do we need to use Object instead of AssetReference? Can you explain it?
     
    Last edited: Nov 26, 2019
  20. Litovets

    Litovets

    Joined:
    Sep 3, 2012
    Posts:
    24
    So, you are calling LoadAssetAsync from AssetReference instance and try to cast the result again to AssetReference. It has no sense. You must cast it to actual object type like you did in coroutine method - worldDefault.LoadAssetAsync<TextAsset>();
     
    phobos2077 and _watcher_ like this.
  21. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    261
    Oh that makes sense! Thank you!
     
  22. JoWi_Uniform

    JoWi_Uniform

    Joined:
    Jul 14, 2017
    Posts:
    15
    Hi there, I'm having an issue with Addressables and custom editor script.
    I'm trying to detect if a prefab selected in scene's asset is an addressable asset
    I then want to get an assetreference of that addressable to work with, I've seen a couple of potential solutions online but none of them seem to work for me.

    I thought i'd found my answer with:

    AddressableAssetSettings.FindAssetEntry(String guid)

    But in my version of unity (2019.1.0f2) / addressables (1.3.3) that doesn't seem to exist, and I can't find out what version it exists in.

    Ideally I want to be able to get a list of all addressables in my project as a list of AssetReferences
    Can anyone suggest a solution?
    Or if anyone can confirm which version of addressables has FindAssetEntry that would be great.

    Cheers!




    EDIT: Solved my own problem! - Editor only

    Code (CSharp):
    1. [/B]
    2.         GameObject SelectedObj = GO;
    3.         GameObject thePrefab = PrefabUtility.GetCorrespondingObjectFromSource(SelectedObj);//Get actual prefab
    4.  
    5.         if (thePrefab != null)//The gameobject has a corresponding prefab
    6.         {
    7.             var assetRef = new AssetReference();
    8.             assetRef.SetEditorAsset(thePrefab);//Get as an asset reference
    9.  
    10.             if (assetRef != null)//The prefab has a corresponding addressable
    11.             {
    12.             }
    13.         }
    14. [B]
     
    Last edited: Nov 26, 2019
  23. JuanMaldonado

    JuanMaldonado

    Joined:
    Oct 12, 2012
    Posts:
    30
    Awesome @karl_jones I'll give it a try.
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I haven't read the entire 9 pages, but google search turned up nothing, so here goes.

    I need to load an AssetReference in edit mode, because for MasterAudio plugin we're only using them for AudioClips and we want to be able to preview them. I came up with the following code, which seems to work, but I don't know if it will work in all cases (what if it's in a Bundle that I haven't downloaded or other scenario?)

    previewer is an Audio Source and _variation.audioClipAddressable is an AssetReference.
    Code (csharp):
    1.  
    2. if (_variation.audioClipAddressable.editorAsset != null) { // seems a good way to check if you chose something other than "none".
    3.        var path = AssetDatabase.GUIDToAssetPath(_variation.audioClipAddressable.AssetGUID);
    4.        var clip = AssetDatabase.LoadAssetAtPath<AudioClip>(path);
    5.        previewer.PlayOneShot(clip, calcVolume);
    6. }
    7.  
    Doing the normal _variation.audioClipAddressable.LoadAssetAsync<AudioClip>().Completed
    stuff just throws an exception in edit mode for me and never reaches the Completed delegate:

    Exception encountered in operation UnityEngine.ResourceManagement.ResourceManager+CompletedOperation`1[UnityEngine.AudioClip], result='', status='Failed': Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=17a65a6007259c64a9dfecd659018abe
    UnityEngine.AddressableAssets.AssetReference:LoadAssetAsync()
     
    Last edited: Dec 7, 2019
  25. wigglypuffs

    wigglypuffs

    Joined:
    Aug 10, 2015
    Posts:
    67
    I'm using 2019.3.0f1 and Addressables 1.5.0.

    I am having some issues:
    • I've noticed that the static checkbox has been removed from the packed content inspector. I discovered these now have to be set in the randomly named content schemas inside the schemas folder, and because they're some random hash name you have to figure out what they are by tweaking a value for timeout on their corresponding profile like Timeout and then check in the Addressables Group which content changed, then go back and find its content schema file and turn on the static. Why was this hidden?
    • And, now instead of "Prepare for Update" in the Build menu there is now a "Check for Content Update Restrictions" under the Tools. Why change the workflow when there are so many videos already made about how to do this, it seems an unnecessary renaming and moving of menu items that still do essentially the same thing. All it is going to do is cause mass confusion and more support issues for Unity hq. And, the new names and their locations in the menu provide no additional benefit. I strongly believe this should be reverted before people start adopting 1.5.0, maybe in 1.5.1 it can go back to the way it was so at least the old tutorial videos still make sense. And, we can forget the tragic decisions that made 1.5.0 possible.
    • Also, "static" is a horrible name to use because it confuses anyone who is thinking of a scene static objects, which is an entirely different beast. Just putting it out there that a new moniker should be developed for the term.
    • The github Addressables-Sample (specifically I used the scene example) is out of date and still targets the old Addressables 1.1.10.
    • I managed to get that example, w/ 1.1.10, to update the size of a cube in the boxes scene remotely via a webserver by assigning the remote profiles, updating remote catalog, and setting the content to static. It only seems to work the first time.
    • However, when I try to do the same with my 1.5.0 project in my actual game (I have unique ids enabled) it only works the first time and each time it generates a new Content Update that is no longer static, can not be detected by "Check for Content Update Restrictions" and doesn't reflect the changes onto the client. Also, each time my Scene1 level (which is 350mb+) creates a whole new bundle that has to be uploaded and the client then has to redownload this entire bundle for what amounts to something as simple as moving a building over slightly. And, my folder on the server ends up with several 350mb bundle files for each content change after I hit the static checkbox in the schema and recheck and rebuild previous.
    • Obviously, I'm doing something wrong and misunderstand how this is supposed to work. But, it's hard when the videos no longer match, the samples are out of date and there are no updated tutorials.

    Note: I am not trying to dynamically load or instantiate the buildings myself. They are part of an already built scene, the scene is set as addressable, that I am LoadSceneAsync via the addressables inside of a menu scene built with the deployed game client. I want to be able to rearrange things that are in the scene, click update, send a very small update of the changes to a webserver, and then using an older built player notice the buildings have moved. Then do it again. And, of course once I get all this working, I'd prefer to be able to have the client detect and update this at runtime as well instead of having to relaunch.

    It's a really simple use case and I'm surprised no example, tutorial or video has been created for it. There are a ton about messing with materials, dynamically spawning and things like that.

    Edit: I managed w/ 1.1.10 sample scene to get what I want to happen to sort of work by dragging/dropping the changed scene from the Content Update each time I want to modify it, back into the Default group and then peforming the Prepare and then Build. This is awkward AF and can't possibly be the way this is supposed to be designed. Though, the fact we have to click the .bin each time is maybe a sign that, yes... yes it is.
     
    Last edited: Dec 22, 2019
    phobos2077 likes this.
  26. _watcher_

    _watcher_

    Joined:
    Nov 7, 2014
    Posts:
    261
    Bug in Addressables 1.4.0 and 1.5.0 - cant load Sprite/TextAsset (possibly other) Addressable asset types when built for Android/Windows standalone (apk/exe). Id expect same behavior on other platforms. Addressables 1.3.8 seem to be the last version without the bug.

    Related threads here:
    1) cant load TextAsset
    2) cant load Sprite
     
    Last edited: Dec 27, 2019
  27. MrBum

    MrBum

    Joined:
    Oct 7, 2016
    Posts:
    6
    Hello, any way to cancel download addressable. I has some bundle to update date with big size and I thing user want cancel them in some case!
     
  28. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    anyone know if this is not possible for you as well where SpriteSheets = label (note the LoadAssets and not LoadAsset.... Addressables.LoadAssetsAsync<IList<Sprite>>("SpriteSheets", null)
     
  29. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    150
    @MrBum - i have never personally tried to cancel yet but the task is passed so if you have the Task you could dispose it or however else you want to deal with it. - hope that helps!
     
  30. roshaantariq

    roshaantariq

    Joined:
    Dec 6, 2017
    Posts:
    32
    Is there any update on hosting of addressable systems onto a personal server? Like Amazon AWS or Azure or any other server?
     
    chanon81 likes this.
  31. sandeepsmartest

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    138
    How do i download asset bundles manually?I dont want addressable system to download the assetbundle automaticaly (with the help of remote catalog) .Assume i have a xml file in the cloud which tells me the assetbundle name or asset bundle path.As soon as i open the game i would query the xml file for the assetbundle name and then i would download that specific assetbundle on demand.I was doing this easily using legacy assetbundles but it looks little tricky with this addressables system.Any Ideas or Hints??Thank you
     
  32. sandeepsmartest

    sandeepsmartest

    Joined:
    Nov 7, 2012
    Posts:
    138
    Are you talking about the assetbundles hosting?If yes, yeah we can.I uploaded my assetbundle along with catalog in S3 bucket and downloaded it in my unity client android application.
     
  33. TakeshiSaito

    TakeshiSaito

    Joined:
    Jul 21, 2018
    Posts:
    3
    The Addressable Event Viewer will not show loaded resources count.

    I want to fix this trouble which is happening in my editor.
    Does anyone know how to fix this problem? Or, is there any known issue regarding this problem ?

    I turned on `Send Profiler Event` of the addressable asset setting data !
     

    Attached Files:

  34. roshaantariq

    roshaantariq

    Joined:
    Dec 6, 2017
    Posts:
    32
    No, I am talking about hosting the addressable assets somewhere from end users can access
     
    sinaari likes this.
  35. skwsk8

    skwsk8

    Joined:
    Jul 6, 2014
    Posts:
    35
    Anyone know how to select an existing AddressablesAssetSettings.asset ? On the Addressables Groups tab there used to be an "Import Addressables Settings" button, but now (1.5.0) it's missing, which is a *blocking issue* for one of the projects as we have shared streams between a couple projects and they share the same addressable assets.

    upload_2020-1-22_11-32-42.png

    [EDIT:] Solution: https://forum.unity.com/threads/import-addressables-settings-missing.814692/#post-5478114
     
    Last edited: Feb 13, 2020
    gawoon likes this.
  36. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    155
    So i'm loading a scene with Addressables just to try it out but i'm running into an issue where the editor doesn't load the scene if i enter the game in editor a second time.

    I'm pretty sure i'm running into some issue with domain reloading being turned off and Addressables, but when using SceneManager it loads every time just fine.

    Is this a bug?

    Also, i'm noticing that Addressables is maybe reporting wrong PercentComplete values or isn't triggering IsDone when the Scene is actually loaded. You can see in the first image it says "PercentComplete" is 1 for 3 frames before IsDone triggers.

    Code (CSharp):
    1. var async = Addressables.LoadSceneAsync("DialogScene", LoadSceneMode.Additive);
    2.  
    3. Debug.Log("Start");
    4.  
    5. //yield return new WaitUntil(() => async.IsDone);
    6.  
    7. while (!async.IsDone)
    8. {
    9.     Debug.LogFormat("IsDone: {0}, Percent: {1}, Status: {2}", async.IsDone, async.PercentComplete, async.Status);
    10.  
    11.     yield return null;
    12. }
    13.  
    14. yield return null;
    15.  
    16. Debug.LogFormat("IsDone: {0}, Percent: {1}, Status: {2}", async.IsDone, async.PercentComplete, async.Status);
    17.  
    18. Debug.Log("End");
    19.  
    20. var sceneInstance = async.Result;
    First Play:
    upload_2020-1-22_19-19-7.png

    Second Play:
    upload_2020-1-22_19-21-5.png
     
  37. Blargenflargle

    Blargenflargle

    Joined:
    Feb 24, 2019
    Posts:
    92
    Does addressables have the ability to locally cache downloaded assets? As in, if a client downloads the asset and then restarts the game, will they maintain downloaded assets, or can I flip some switch to make it so they download certain assets?

    Additionally, if they download an asset is there a way to verify that they have the most up-to-date version of that asset? Thanks. Sorry if this has been answered elsewhere, I can't find the information anywhere.
     
    gawoon and hopeful like this.
  38. Deleted User

    Deleted User

    Guest

    Thanks for all the work on this system - it looks extremely good! I'd have a question for a rather specific use case we have. We deploy VR experiences to customers behind rather intrusive corporate proxies. If we'd still want to take advantage of addressable assets served by external servers (like CDNs) we'd somehow make the addressable system proxy-aware. Setting the `http_proxy` and `https_proxy` environment variables isn't the best option because those proxy setups tend to be a bit more complicated. Our customers tend to have proxy teams that deploy the system configuration using general polices and so called `pac` files which we resolve and parse on run-time.

    If we had the possibility to hand over a `HttpClient` or a `HttpClientHandler` pre-configured with our proxy setup we might be able to do this - unfortunately I don't see any way to do this in the existing documentation.

    Do y'all have experience with resolving such an issue?
     
    MNNoxMortem likes this.
  39. sskenth

    sskenth

    Joined:
    Sep 23, 2016
    Posts:
    54
    Hi, so I'm having an issue when I try to make a simple change to a game object and update server content.

    For some reason, the change doesn't seem to take place for remote files. I can't work out why. My only 3 guesses are 1)I'm either making a very simple mistake,
    2) Addressables don't allow for Gameobject changes like a child object setActive to true to be saved and sent remotely.
    3) Its a bug with addressables.

    Please see this video for a full explanation of the problem.



    I'd appreciate any help or feedback.

    -Sat
     
  40. Ak47-forever

    Ak47-forever

    Joined:
    Mar 1, 2015
    Posts:
    16
    Hi,
    Each time i change script or hit play button got this annoying popup panel(check screenshot) "Building Results Tree"
    How to fix this? This is really slow down my development?

    Screenshot_15.png
     
  41. JoWi_Uniform

    JoWi_Uniform

    Joined:
    Jul 14, 2017
    Posts:
    15

    If you go to your Window > AssetManagement > Adressables > Groups window
    If you have "Simulate groups" selected under Play mode script at the top I believe it may cause this?
    I think this is simply because unity is setting up your assets on a localhosted server to simulate downloading from your actual content location?

    Try changing to use asset database (I think this will forgo the server simulation and just load your assets from the editor)
    Or use existing build if you have an actual build setup ready to use.
     
  42. JoWi_Uniform

    JoWi_Uniform

    Joined:
    Jul 14, 2017
    Posts:
    15
    Can anyone help with some clarification on the cache options for addressables and how they work?

    Every new launch of our web app will have users download all content for that session from an aws server.
    To simulate this in editor I've disabled "use asset bundle cache" so that I can more accurately gauge download sizes and speeds.


    However does disabling this mean that if I download an asset through:
    Addressables.LoadAssetAsync<GameObject>(Key);

    Wait three seconds and download it again, will it:
    A: Re-download the entire asset fully from the server
    B: Grab the previously downloaded asset saved somewhere locally?


    Just trying to get a better grasp on what the asset bundle cache actually does.


    Another question, if we call the above code twice in a short amount of time / single frame, will it try to download the asset twice regardless of cache settings or is the addressable system smart enough to realise it only needs to download once and use the result for both calls?


    Cheers for any help.
     
  43. NawarRajab

    NawarRajab

    Joined:
    Aug 23, 2017
    Posts:
    20
    Hi,
    I'm getting an error with trying to build addressables with 1.7.4

    Code (CSharp):
    1. ArgumentNullException: Value cannot be null.
    2. Parameter name: key
    3.   at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <437ba245d8404784b9fbab9b439ac908>:0
    4.   at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <437ba245d8404784b9fbab9b439ac908>:0
    5.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData+KeyIndexer`1[T].Add (T key, System.Boolean& isNew) [0x00001] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Runtime\ResourceLocators\ContentCatalogData.cs:374
    6.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData+KeyIndexer`1[T].Add (System.Collections.Generic.IEnumerable`1[T] keyCollection) [0x00014] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Runtime\ResourceLocators\ContentCatalogData.cs:368
    7.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData+KeyIndexer`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] keyCollection, System.Int32 capacity) [0x00028] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Runtime\ResourceLocators\ContentCatalogData.cs:361
    8.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData.SetData (System.Collections.Generic.IList`1[T] data) [0x000a7] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Runtime\ResourceLocators\ContentCatalogData.cs:426
    9.   at UnityEngine.AddressableAssets.ResourceLocators.ContentCatalogData..ctor (System.Collections.Generic.IList`1[T] entries, System.String id) [0x00052] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Runtime\ResourceLocators\ContentCatalogData.cs:349
    10.   at UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.DoBuild[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput, UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext aaContext) [0x00354] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Editor\Build\DataBuilders\BuildScriptPackedMode.cs:174
    11.   at UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode.BuildDataImplementation[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) [0x00154] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Editor\Build\DataBuilders\BuildScriptPackedMode.cs:95
    12.   at UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase.BuildData[TResult] (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput builderInput) [0x00059] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Editor\Build\DataBuilders\BuildScriptBase.cs:63
    13.   at UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContentImpl () [0x00034] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Editor\Settings\AddressableAssetSettings.cs:1700
    14.   at UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.BuildPlayerContent () [0x000cf] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Editor\Settings\AddressableAssetSettings.cs:1682
    15.   at UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildPlayerData () [0x00001] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Editor\GUI\AddressableAssetsSettingsGroupEditor.cs:271
    16.   at UnityEditor.AddressableAssets.GUI.AddressableAssetsSettingsGroupEditor.OnBuildScript (System.Object context) [0x00009] in C:\Users\nawar\Desktop\Source\Unity\aila-preschooler\Library\PackageCache\com.unity.addressables@1.7.4\Editor\GUI\AddressableAssetsSettingsGroupEditor.cs:266
    17.   at UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) [0x00020] in <6f28216fea9f453abf2e05b770ed3ee4>:0
    18.  
     
  44. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    A Fix is being done, should appear in 1.8.0 according - not sure when 1.8.0 is being released
     
    NawarRajab likes this.
  45. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    NawarRajab likes this.
  46. kiferdon

    kiferdon

    Joined:
    Aug 14, 2018
    Posts:
    15
    Did you find a solution?
     
  47. dizzy2003

    dizzy2003

    Joined:
    Nov 25, 2013
    Posts:
    108
    Addressable system is almost great, but appears to be unusable for console platform patches/DLC (the reason we started using it). Am really hoping I am doing something wrong.. (am on 1.7.5)

    Am using static groups (can not change post release) and Build Remote Catalog ticked.

    I also have Unique Bundle ID's Unticked. but have tried both ticked and unticked.

    If I change a texture and run tools/Check for Content Update Restrictions, it doesnt just put the texture in the content update, but also everything that depends on that texture, that appears to not just include the material, but also the prefab and even the fbx. So potentially changing 1 small asset can bring in a ton of content that hasnt actually changed. causing you to easily break the 500MB patch/dlc update limit on one console platform. Imagine changing a widely shared shader it could cause half our project to be put in the patch!

    I tried moving each asset type to its own group ( so shader,material,texture,prefab,fbx) but had the same result.

    Note I am copying the addressables_content_state.bin file to the build folder with the built asset bundles and it does correctly produce a build with the old identical asset bundle and a new content update bundle, and running does load the new texture. its just has a much bigger than expected asset bundle for the update.

    I notice in the documentation DevelopmentCycle/UniqueBundleID's it states

    "The downside of this option is that it requires bundles to be rebuilt up the dependency chain. Meaning if you changed a material in one group, by default only the material's bundle would be rebuilt. With "Unique Bundle IDs" on, any asset that references that material would also need rebuilding." (form https://docs.unity3d.com/Packages/c...manual/AddressableAssetsDevelopmentCycle.html)

    I have tried turning this option on and off and it appears to make no difference and its still trying to place all upchain dependencies in the Content Update bundle.

    Am hoping this is just a bug or user error some how..

    :(
     
  48. DoVanLoc

    DoVanLoc

    Joined:
    Jul 19, 2017
    Posts:
    1
  49. moxiewhimsy

    moxiewhimsy

    Joined:
    Nov 13, 2013
    Posts:
    3
    Addressables: 1.8.3
    Unity 2018.4.19f1 AddressablesDemo 4_25_2020 19_27_37.png

    Running into an issue when running windows builds where I encounter a "NullReferenceException: Object reference not set to an instance of an object" in "PackageCache/com.unity.addressables@1.8.3/Runtime/Initialization/InitializationObjectsOperation.cs Line: 28"

    It occurs when I try to run
    Code (CSharp):
    1. Addressables.InitializeAsync();
    , but I found it also occurs in a windows build of the basic space shooter demo in https://github.com/Unity-Technologies/Addressables-Sample
     
  50. LeleUnity

    LeleUnity

    Joined:
    Jul 30, 2016
    Posts:
    97
    @karl_jones jo a simple question:

    Code (CSharp):
    1. AsyncOperationHandle<GameObject> textureHandle = Addressables.LoadAssetAsync<GameObject>("AssetAddress");
    2. textureHandle.Completed += ElementToNotify1.TextureHandle_Completed;
    3. AsyncOperationHandle<GameObject> textureHandle = Addressables.LoadAssetAsync<GameObject>("AssetAddress");
    4. textureHandle.Completed += ElementToNotify2.TextureHandle_Completed;
    5.  
    If texture handle variable is overwritten with the same command, BEFORE "ElementToNotify.TextureHandle_Completed" is fired,
    Then,
    they will be considered as different events( so each ElementToNotify1 gets notified once), or as unique event completed (so ElementToNotify is notified twice) ?
     
Thread Status:
Not open for further replies.