When building addressables through the Addressables Groups window, you can clean build data using Build → Clean Build → All. This allows us to clean the local addressables data before building for a ‘clean’ addressables build.
I haven’t found the addressables API to replicate this behavior when building addressables via script. How should I go about this?
Just in case the URL breaks in the future, I’ll summarize the answer here:
In order to clear the addressables content builder cache, you should use the following line (assuming you’re using the default data builder or have set your custom one already): AddressableAssetSettingsDefaultObject.Settings.ActivePlayerDataBuilder.ClearCachedData();
In order to clear the scriptable build pipeline cache, you should use the following line (assuming you want to avoid opening a prompt window because this is for a CI flow): BuildCache.PurgeCache(false);