Search Unity

Two issues - filename restrictions & renaming asset files

Discussion in 'Addressables' started by Huacanacha, Oct 24, 2019.

  1. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    I've been experimenting with Addressables and have come across a few issues:
    1. Failure to Load an asset with "Unknown error in AsyncOperation" exception when the filename contains certain characters. In my case I had "[" and "]" characters in prefab asset names. The exception (when loading the asset) gives no help identifying the problem. If there are restrictions on filenames that should be detected automatically when creating addressable entries (preferably) or at least have a meaningful error when trying to load.
    2. Moving or renaming asset files breaks the Addressable asset entry until the editor is restarted. The "path" doesn't update as I would expect (which is what does happen after restarting editor). There doesn't seem to be a way to "refresh" the addressable asset list. Given the UI behaviour I initially thought moving source assets wasn't supported at all (which would be very odd and limiting) and that I would have to recreate all entries.
    3. When using LoadAssetsAsync, if the combination of keys/labels provided returns no results an exception is thrown. Surely this should return an empty list instead?
     
    Last edited: Oct 24, 2019
  2. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    429
    It possibly happens because addressables use "MainAsset[SubAsset]" naming convention for addresses.
     
  3. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hey @Huacanacha for your points
    1) I think @TextusGames is correct. I imagine that is the case. We'll take a look at implementing one of those suggestions.
    2) What version of the package are you using? That sounds very similar to a bug that was recently fixed. The fix may not be in a publicly released version yet. I can't remember specifically when that fix went in.
    3) I'll bring this up as a topic of discussion. To help us keep track would you mind filing a bug with Unity on any/all of these and post the case number(s) in this thread?
     
  4. Huacanacha

    Huacanacha

    Joined:
    Aug 16, 2013
    Posts:
    60
    Thanks David and Textus.

    1) Yes that makes sense. The ideal would be to still support "[" and "]" without breaking the sub-asset addressing. This could especially be an issue for the automatically created "Built in data".
    2) I have tried with 1.2.4 and 1.1.0. Same result. The screenshot below shows the result with 1.1.0 in 2019.3.0b8, using your sample project and just renaming "Cube" prefab to "CubeXX". Same deal with 1.2.4 and 2019.1.12f1.
    3) Sure. Case 1193914 is for the exception message & null result for "no result" app load requests. 1) and 2) can be reproduced in this same project. To repro 1) just duplicate Cube prefab, rename it "[Cube]", add it to Addressables and try to load it instead of Cube. To repro 2) just rename Cube prefab directly as I mention above.

    Oh and to clarify 3): it seems the exception is caught by the Addressables system. The issue is displaying an exception message for a valid use-case, and returning a null result instead of an empty list (which is what should happen if a query has zero results).

    Screen Shot 2019-10-24 at 12.12.58.png
     
    Last edited: Oct 25, 2019
  5. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    @Huacanacha excellent, thank you for the information. I think for 2) that fix is going to be in a 1.3.x release so that should be out in a week or two. Thank you for submitting that case. I'll pull that into our team and take a look.
     
    Huacanacha likes this.