お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
Closeアセットバンドルをビルドするときに、必ず使うアセットを設定します(RO)
これは簡単にバンドルの主要なアセットを探すことが出来る便利な関数です。 例えばギャラクターのプレハブが欲しく、バンドルにはキャラクターに関する全てのテクスチャ、マテリアル、メッシュ、アニメーションファイルが含まれているとします。 そこでギャラクターのプレハブをmainAssetにすることで簡単にアクセスすることが出来るようになります。
function Start () { var www = WWW ("http://myserver/myBundle.unity3d"); yield www; // Get the designated main asset and instantiate it. Instantiate(www.assetBundle.mainAsset); }