4
3

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 5 years have passed since last update.

AssetBundleのラベルをスクリプトから設定する

Last updated at Posted at 2016-01-31

Unity5から導入されたAssetBundleのラベル、便利ですよね。
でも、AssetBundleが増えてくると手動で設定するのも億劫になってきて、ラベルを自動設定したくなってくると思います。

以下のコードで設定することが出来ますので、保存されているファイルパスをそのままラベルに設定する、というようなことも可能です。
(Unity5.2.2で動作確認済み)

AssetImporter.GetAtPath(filePath).assetBundleName = label;

改行も認識されてしまうので、事前に改行コードは除去するようにしておきましょう。

4
3
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
4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?