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. Dismiss Notice

Bug b15 Player and Addressable build bug. Regression

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

  1. SevenPointRed


    Feb 3, 2016
    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