Search Unity

Square brackets in file path

Discussion in 'Addressables' started by Azirell, Dec 21, 2019.

  1. Azirell

    Azirell

    Joined:
    Oct 16, 2015
    Posts:
    29
    If Addressable path contains square brackets an error occurs.

    Exception encountered in operation Resource<Texture>(Name[1].jpg): Unknown error in AsyncOperation
    UnityEngine.AsyncOperation:InvokeCompletionEvent() (at C:/buildslave/unity/build/Runtime/Export/Scripting/AsyncOperation.cs:21)

    This might be already known issue, but I did not find it on forum.
    As far as I understand this issue appears because of sub object syntax.
    Not asking to fix this, simple visual warning or more specific error description would be more than enough. Figuring out wthat's wrong took a couple days =(
     
    TigerHix and EirikWahl like this.
  2. ConjuringTheFuture

    ConjuringTheFuture

    Joined:
    Feb 19, 2014
    Posts:
    19
    Thanks. We had to spend the few days discovering this out on our own but glad to know someone already mentioned it here.
     
  3. Shaunyowns

    Shaunyowns

    Joined:
    Nov 4, 2019
    Posts:
    328
    I'll send this post over for you @Azirell so the team can have a nosy!
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    762
    Hey @Azirell yeah we definitely need better documentation at the very least. Have you filed a bug with Unity? It helps us keep track of things.
     
  5. Azirell

    Azirell

    Joined:
    Oct 16, 2015
    Posts:
    29
    DavidUnity3d, Case 1213747.
    Sorry, I was not sure if it is known issue, so I did not file a bug report.
     
    davidla_unity likes this.
  6. sethseth6

    sethseth6

    Joined:
    Apr 18, 2014
    Posts:
    2
    Can confirm this happens. Our prefab had square brackets in the file name, and we got that same exact error. Taking them off did fix the issue.
     
    davidla_unity likes this.
  7. yuch3n

    yuch3n

    Joined:
    Sep 26, 2018
    Posts:
    26
    I just ran into this as well, I'm on version 1.11.2 of the Addressables pkg. The error message I got:
    Code (CSharp):
    1. Exception encountered in operation Resource<ScriptableObject>(RealmMap_0_[3].asset): Unable to load asset of type UnityEngine.ScriptableObject from location Core/RealmSegment/Map/RealmMap_0_3.
    2.  
    Even though there are no square brackets in the address, so long as the asset itself has square brackets in its name, it will produce this error.