LoginSignup
1
1

More than 5 years have passed since last update.

スクリプト経由でAssetBundleNameを付加する方法

Posted at
// プロジェクトフォルダからの相対パス指定でないとダメっぽい
var assetPath = "Assets/Hogehoge.txt";
var importer = AssetImporter.GetAtPath( assetPath );
importer.assetBundleName = "bundleName";
importer.SaveAndReimport();

エディタスクリプトでアセット生成した直後にAssetBundleNameを設定しちゃいたいとか、複数のファイルに対して一括でAssetBundleNameを設定しちゃいたいときに使えると思います。
アセットに対するAssetBundle関連の設定はすべてAssetImporterからやるようです。

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