AddressableAssetSettingsDefaultObject.Settings is null when running in batchmode

i have a build task in ci ,the task is

  • generate some resources

  • use AddressableAssetSettingsDefaultObject.Settings to assign step1’s resources to corresponding group

  • use BuildPipeline.BuildPlayer to build the player

but i get error in step2 ,cause AddressableAssetSettingsDefaultObject.Settings is null ,please help


unity:2019.4.10f1
addressables:1.16.7

Did you find out why this was? I’m seeing the same outcome using the same addressables/unity versions.

From the documentation

https://docs.unity3d.com/Packages/com.unity.addressables@0.4/api/UnityEditor.AddressableAssets.AddressableAssetSettingsDefaultObject.html
“Gets the default addressable asset settings object. This will return null during editor startup if EditorApplication.isUpdating or EditorApplication.isCompiling are true.”

I’ll kick this to the team for some guidance.

no. but it’s fine when run the command as root , so i don’t dig deeper , you can give a try

Hello guys, I got the same issue here.

AddressableAssetSettingsDefaultObject.Settings is null when making build from command line with batch mode enable

Are you able to reproduce this problem reliably? Because I’m not:

If you have a reproduce, can you please submit a bug report? Without an user bug report in their system, nothing really seems to get done here.

I just submitted a bug report for my repro case (details in the thread linked by @Peter77 )

Does anyone have a workaround for this?
Using EditorCoroutines to await the compilation doesn’t seem to work as the recompile seems to kill the executing code.

a workaround was just suggested from one of the unity guys in the linked thread MikeHergaarde, might want to give that a shot (I have not yet)

1 Like