Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug AddressableAssetSettings.BuildPlayerContent() causing "Abnormal situation" error

Discussion in 'Addressables' started by Oxic333, Dec 13, 2022.

  1. Oxic333

    Oxic333

    Joined:
    Apr 13, 2021
    Posts:
    2
    Hi everyone, I'm new to the unity Addressable tool and I just stumped into an error that I can't quite figure out the reason. Basically, whenever I try to build the player content using the AddressableAssetSettings.BuildPlayerContent() method It sometimes end up showing this error message:
    This error appears whenever I want to upload an existent asset but with some of its fields removed. If I upload an existent one with some new fields that didn't exist previously then no errors show up. The error also doesn't shows if I manually delete the build before calling the AddressableAssetSettings.BuildPlayerContent(), so the problem is when the addressable chooses to update the previous build. ¿Does anyone know the reason why this is happening or a workaround?

    I don't know if I have explained myself good enough but this is a brief description of my problem.

    I'm using Unity 2020.3.13f and the Addressables 1.16.19 package.

    Thanks in advanced to everyone!
     
  2. pillakirsten

    pillakirsten

    Unity Technologies

    Joined:
    May 22, 2019
    Posts:
    346
    Hi @Oxic333 1.16.19 is a little old, is it possible to upgrade the project to the latest Addressables (1.21.2)?
     
  3. Oxic333

    Oxic333

    Joined:
    Apr 13, 2021
    Posts:
    2
    Hi, @pillakirsten, thanks for answering!. The highest version I can update to before everything explodes is 1.20.3 and it still wont work. I'm going to try and see if I can fix those problems that occur when updating to 1.21.2.
    Nevertheless I've found a work around but I'm not sure if it's the right way to make it.

    Workaround:
    Just before the AddressableAssetSettings.BuildPlayerContent() if the AddressableAssetSettings.CleanPlayerContent() method is called then the abnormal situation error doesn’t show up. The official documentation says that this method “deletes all created runtime data for the active player data builder” but I'm not 100% sure what this data is and if it could cause any unwanted behaviors down the line. I understand that this will also have a performance cost but if it's necessary then that's how things will go.