Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Bug] Assets in nested subfolders are added twice during content build -> ArgumentException

Discussion in 'Addressables' started by stefankohl, Sep 16, 2019.

  1. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
    Please check the attach repro project.

    There is a particular asset group setup with nested folders that causes "Build Player Content" to fail due to the following exception:

    In the repro project, there is folder named "Test" containing a subfolder "Test2". "Test2" contains an asset called "MaterialB". Now I add folder "Test" to an asset group (also called "Test"). Everything works fine, "Test2" automatically gets added to the asset group as nested folder. However, when I add "Test2" separately to the same asset group, the bundle build fails because it tries to add "MaterialB" to the asset bundle twice although it is only shown once in the Addressable window (nested below Assets/Test/Test2).

    I use this setup for adding labels to all assets contained in the parent folder without labeling the child folders.
     

    Attached Files:

    BAIZOR likes this.
  2. stefankohl

    stefankohl

    Joined:
    May 30, 2014
    Posts:
    53
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    Seems like a straightforward bug. Thanks for posting, I'll add it to the backlog.
     
  4. ValdenaireAlexandre

    ValdenaireAlexandre

    Joined:
    Apr 15, 2016
    Posts:
    3
    We fixed it by changing the Directory.GetFiles in AddressableAssetEntry.cs which get all the files recursively by a scan directory one by one, checking if they are not marked as addressables.
     
    TextusGames likes this.
  5. RobbyZ

    RobbyZ

    Joined:
    Apr 17, 2015
    Posts:
    38
    I am also getting the ArgumentException during addressables build bug on Unity 2018.4.2f1 when I tried to upgrade Addressables last week (currently running on 1.1.5 without the exception, attempted to upgrade to 1.4.0 and got it).

    I don't think I'm using nested folders, though. I tried searching the key it failed on, and it didn't match any guids in the project (perhaps it's not keyed off guids though).

    Any word on when the fix will be released?
     
  6. BAIZOR

    BAIZOR

    Joined:
    Jul 4, 2013
    Posts:
    112
    The same with Unity 2019.2.21 and Addressable 1.6.2
     
  7. NamelessPerson

    NamelessPerson

    Joined:
    Apr 17, 2017
    Posts:
    26
    Bump.

    This is still an issue in 2019.3 addressables 1.8.3
     
  8. Radghiv

    Radghiv

    Joined:
    Jan 11, 2014
    Posts:
    2
    Bump, I'm having this issue too.
    Unity 2020.1, addressables 1.8.3.
     
    electric_jesus likes this.
  9. nchandrahas

    nchandrahas

    Joined:
    Feb 4, 2019
    Posts:
    8
    addressables 1.10.0 also has this
     
    electric_jesus likes this.