Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug b15 Player and Addressable build bug. Regression

Discussion in '2021.2 Beta' started by SevenPointRed, Oct 8, 2021.

  1. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    220
    I had to add a bunch of extra code during the last few betas to hack around the domain reload being broken and managed to get a build that worked without domain reload.

    I now get the following error in b15 when building addressables.

    Code (CSharp):
    1. RuntimeInitializeOnLoadMethodAttribute: Is not allowed on a Generic class AddressablePrefabPool`1.DomainReload
    2. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent ()
    The code, its just in a generic class that controls object pooling, nothing fancy.

    Code (CSharp):
    1. #if UNITY_EDITOR
    2.         [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
    3.         static void DomainReload()
    4.         {
    5.             // Clears some static lists.
    6.         }
    7. #endif