コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】ゲームをビルドする時に自動で Addressables のビルドを実行する方法

検証環境

  • Unity 2021.2.7f1
  • Addressables 1.19.15

概要

AddressableAssetSettings の Inspector の
「Build > Build Addressables on Player Build」を変更することで
ゲームをビルドする時に自動で Addressables のビルドを実行できるようになります

項目 内容
Use global Settings Preferences の設定を使用
Build Addressables content on Player Build ゲームのビルド時に
Addressables をビルドします
Do not Build Addressables content on Player Build ゲームのビルド時に
Addressables をビルドしません

Preferences で左メニューで「Addressables」を選択して
「Build Addressables on build player」を変更すると
AddressableAssetSettings の設定が「Use global Settings」の時に使用されます

参考サイト様

https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/