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

Question Writing a check Addressables test...

Discussion in 'Addressables' started by jasonatkaruna, Jun 19, 2020.

  1. jasonatkaruna

    jasonatkaruna

    Joined:
    Feb 26, 2019
    Posts:
    64
    My team frequently runs into the issue where addressables go missing, which is an issue itself, but I'd like to run a test that checks to make sure no addressable references are missing.

    I'm not super familiar with the Addressables API, so what's the best way to go about this with an editor test?

    I'd like to just check all the references in my Default Group and see if any are missing.
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,816
    Let me forward this for the team for some guidance. Which version of Addressables are you using?
     
    jasonatkaruna likes this.
  3. jasonatkaruna

    jasonatkaruna

    Joined:
    Feb 26, 2019
    Posts:
    64
    Thanks! I'm using 1.8.4
     
  4. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    762
    Hey @jasonatkaruna so I might try updating to 1.11.2 and see if that helps your lost Addressables issue. I can't remember exactly when but I think around the time of that release we saw a bunch of issues that sound very similar and put in a fix. It may not help you but I would definitely give it a shot.

    As far as writing editor tests I think you'll probably get a lot of mileage out of looking into
    Code (CSharp):
    1. AddressableAssetSettingsDefaultObject.Settings.*
    2.  
    this will let you iterate through the AddressableAssetGroup list and those groups will let you iterate through their entries. Not sure what you had in mind as far as what you're validating against but that should get you started.

    Hope that helps!
     
    jasonatkaruna likes this.