Search Unity

All sort of problems with addressable schemas

Discussion in 'Addressables' started by sebas77, Jan 6, 2020.

  1. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,025
    I didn't pin down exactly where the problem is yet, but randomly schemas disappears, even if the addressable related files didn't change. It happen often when I share project over github or perforce. It works perfectly on a user, but the other user, with exactly the same files, don't have the schemas.
    Sometimes I just open the project and the schemas are gone.
    Help?
     
  2. DetroitBrian

    DetroitBrian

    Can't spell "Community" without "Unity"! Unity Technologies

    Joined:
    Oct 17, 2019
    Posts:
    10
    Hi @sebas77,

    Can you give us a bit more information to be able to help you? We'd like to know what version of the addressables package you're working with to start, and what version of the editor you're using might be helpful too. Thanks!
     
  3. Jribs

    Jribs

    Joined:
    Jun 10, 2014
    Posts:
    77
    This sounds similar to a few different issues that people have had and I believe it comes from an issue with the addressable group data files not being marked as dirty so the project doesn't actually save them. In turn your repo won't recognize the files as changed.

    I don't have a link to it at the moment but there's a little script floating around the forums here that will force the files you have selected as dirty which will help force those files to save properly.
     
  4. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,025
    The version we currently use is 1.5.0. To be honest, updating it regularly hoping the problem is fixed is also the cause why I can't pin the problem down. The problem happens with 2019.2 and 2019.3, maybe due to different causes though especially since 2019.3 is using the new assets version. In short, it's not simple. What I know is that the schemas disappear and while some time they come back if I rebuild the library folder or if I revert addressable schemas, other times I just have to rebuild everything, which points to the fact that maybe there are multiple issues. Last issue seemed related to the lack of group templates files, but tbh with you, I didn't and I don't have the time to understand all the addressable related details to understand what a group template is, we use it in the simplest form possible (built-in and default schemas, no hosting and loading from the HD)
     
    Last edited: Jan 13, 2020
  5. DavidUnity3d

    DavidUnity3d

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    192
    Hey all, so I think these issues are related to a check we're doing on import to see if you've deleted one of your assets from disk while Unity was closed or some other scenario. During import, sometimes empty string paths can be part of the list of "deletedAssets" which can throw our check some false positives. I have a simple manual fix you can add or you can see if this fixes your issue when we do our next release.

    The manual fix:
    In AddressableAssetSettings.cs, in internal bool CheckForGroupDataDeletion(string str), add the following check at the start of the method
    Code (CSharp):
    1. if (string.IsNullOrEmpty(str))
    2.                 return false;
    To note: you may be having different issues. This fixed a lot of our test cases where we were able to repro that behavior. If that doesn't solve your problem let us know.
     
    sebas77 likes this.
  6. YouthC

    YouthC

    Joined:
    Nov 1, 2018
    Posts:
    2
    I have the issue with the same description. My Addressable version is 1.5.0 (Unity version doesn't matter). My build assets with catalog are on the google cloud storage, addressables_content_state.bin is pushed into a git repo.
    I've faced the issue using CI (teamcity) and tried to reproduce it locally, I pulled the project from a git repository anew. And... result was expected.
    First, I met the error: Player content must be built before entering play mode with packed data.
    Then I locally updated my previous build. And... As I thought it had began working.
    It's quite inconvenient to not have internal solution of addressable system when using CI.
    Second, I returned to the main local copy of the project, build new asset, uploaded them to the remote storage and pushed addressables_content_state.bin.
    I opened my local copy of project that I used for testing the issue, pulled changes from repo. And... the result is error: Unknown error in AsyncOperation... There is no hash file because Unity tried to get it with old name.
    This issue was solved by updating previous build again.

    Is there more effective solution?
     
  7. DetroitBrian

    DetroitBrian

    Can't spell "Community" without "Unity"! Unity Technologies

    Joined:
    Oct 17, 2019
    Posts:
    10
    Hey @YouthC would you mind creating a new thread for this? Thanks!
     
    DavidUnity3d likes this.
unityunity