Addressables 1.12 gives error "Address cannot contain [ ]" but address doesn't contain such thing

Another thread. We are using this code:

var operation = Addressables.LoadContentCatalogAsync(url);

Where url is this:

And, on the exact line of the call, we get this error :

What? :hushed: This has got nothing to do with the address used, but is actually the Resources path of the instantiated prefab that contains the script where the above code is called. Why is this happening? Was fine before 1.12.

Thanks for flagging! Could you also (if you haven’t already) submit a bug report for us?

Sadly I haven’t due to lack of time. :frowning: We also had trouble with another prefab with in the name that WASN’T the object containing the script of the above code, so this might just be related to calling Resources.Load on an asset with a weird name while Addressables are doing something. (wild guess!)

I can try to create a report next week, but I’m not sure if I’ll be able to. If I do I’ll let you know here.

As a heads up, we are having the same problem getting that error.

In our case it happens when building the addressables. We rolledback to 1.10.0 and now we can build them again. In our case the asset in question it does contain [ ] . But do not understand this change and the need of it.

Intersting that it is happening for you while building!

We have found that the error persists even if we disable the creation of the prefab after it happened once. With default Addressable settings (no groups), this code is enough to trigger the problem:

Resources.Load<GameObject>("[Test]");    // just call this beforehand
Addressables.LoadContentCatalogAsync("url");    // "url" is invalid and will throw errors, but it also happens with valid urls

I have submitted a bug report, case 1266093.

Hi, is it possible to support [ ]? Most of my assets in projects have them.

I believe if it’s allowed to name something like that in the editor - it should not constrain us in such a way with Addressables. What I mean is it’s very convenient for us to name assets in a manner of [Scene] Test or [Material] Cog, also some of the code and regex could be used to conveniently do things with names like that, but Addressables don’t allow this :frowning:

@MaxKarpinsky It should be allowed to have [ ] in the asset names, it’s just not allowed in the address since it’s reserved for sub-objects. This seems to just be a bug.

Still if it doesn’t recognise it being a special command in address why not allow it? I like to keep my paths full, they might contain multiple [ ] in the address, it’s tedious work to rename address each time. What I mean - with [ ] restriction = manual labor is required, without naming objects containing [ ] = no manual labor required, the obvious choice is not to use [ ] in object names at all which is restricting and unintuitive.

The restriction is only there for purposes of addressing sub-objects. How would you change it?

Assets/Sheet/sprite_sheet_0, Assets/Sheet/sprite_sheet_1, Assets/Sheet/sprite_sheet_3
Or path could have an escape sequence like Assets/\[Scene\] Test.

Wouldn’t that be the asset name? Not the address which looks more like “30d8dfb7bcb23db40afb8b7d629644dc”

When I try to change Addressable Name from Assets/Angry Cubero.prefab to Assets/[Angry Cubero].prefab - this error pops up.
6161401--673717--upload_2020-8-3_1-9-36.png