LoginSignup
0
0

More than 3 years have passed since last update.

AssetGraphで生成したバンドルファイルの位置がようやく理解できたのでメモ

Last updated at Posted at 2020-09-19

はじめに

AssetGraphを使って AssetBundle を作成した際、出力ディレクトリに関して混乱していたのでまとめます。

AssetGraphの使い方は、公式のドキュメントに記載されています。

AssetBundleドキュメント

AssetBundleの出力ディレクトリ

出力するAssetBundleのディレクトリは、「Build Asset Bundle」ノード(赤色のノード)で設定されています。「Output Option」で形式を指定できます。
最初の1つ目が既定で、残り3つがディレクトリ指定型です。

Build In Cache Directory

規定のディレクトリです。ディレクトリ名は以下となります。

/Assets/AssetGraph/AssetBundles/Cache/AssetBundles/(id)/(platform)

platformには Windows などが入ります。

Error If No Output Directory Found

ディレクトリを指定できますが、存在しないディレクトリを指定するとエラーになります。

Automatically Create If No Output Directory Found

ディレクトリを指定し、存在しないときは自動的に生成します。

Delete And Recreate Output Directory

ディレクトリが存在すれば一旦削除し、再生成します。

ディレクトリの指定のコツ

Webを使わない場合、 Output Directroy を /Assets/StreamingAssets に指定しておけば、手間を掛けずに AssetBundle ファイルを設置できます。

また、Output Directory に (Platform) を指定すれば、プラットフォーム単位で出力するファイルのディレクトリを変えることができます。

例: /Assets/StreamingAssets/(Platform)

まとめのまとめ

このように設定方法を理解することで、AssetBundleの管理にかける手間が省けるので、AssetGraphを活用するきっかけになればと思います。

0
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
0
0