3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Unity の Addressable Asset の覚え書き

Last updated at Posted at 2021-10-06

はじめに

Unity の Addressable Asset の覚え書き。

エディタ実行での注意

Play Mode Script の設定

image.png

  • Use Asset Database (fastest)
    • アセットの解析やアセットバンドルを作成せずにアセットデータベースから Resource Manager を介して直接ロードされる
  • Simulate Groups (advanced)
    • アセットバンドルを作成せずにアセットデータベースから Resource Manager を介してロードされる
    • Use Asset Database とは違い、アセットの依存関係などの解析も行うためエディター実行開始時に時間がかかる
    • 実はエディター実行時には他のモードのどれよりも遅い
  • Use Existing Build (requires build groups)
    • 事前にビルドされたアセットバンドルを使用する(言い換えれば事前に必ずビルドしておく必要がある)
    • エディター実行では最速
    • プレハブにスクリプトが含まれている場合は本体のビルドも行っておく必要がある
      • これを行わないとアセットバンドルのハッシュ値が一致しない

プログラマーがエディター実行するだけなら初期段階から Use Existing Build にしておくというのも一つの手ではあるが色々と問題はある。

  • Windows 環境で iOS の Metal が利用できないので iOS をエディタで実行する場合に正常にシェーダーが機能しない
    • 解決策としては、Metal を諦めて OpenGLES2/3 を利用する事で可能だがパフォーマンスを犠牲にする必要がある。
  • アセットバンドルにスクリプトを含むプレハブを配置するのであればその都度アセットをビルドし適切な場所にデプロイしておく必要がある
    • 解決策としては、スクリプトを含むプレハブは別のアセットグループに配置しておき、そのアセットグループの Load PathLocalLoadPath にしておき更新が必要なくなった時点で RemoteLoadPath に切り替えるという事で可能。
3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?