Version: 5.4
Removed
Method CreateFromMemory has been renamed to LoadFromMemoryAsync (UnityUpgradable) -> LoadFromMemoryAsync(*)

AssetBundle.CreateFromMemory

マニュアルに切り替える
public static AssetBundleCreateRequest CreateFromMemory (byte[] binary);

説明

非同期メモリ領域からアセットバンドルを作成します。

Use this method to create an AssetBundle from an array of bytes asynchronously. This is useful when you want to download the AssetBundle using your own system instead of the WWW class, or when you have downloaded the data with encryption using WWW and need to create the AssetBundle from the unencrypted bytes.

AssetBundle.CreateFromMemoryImmediate と比較して、この関数は AssetBundle 解凍をバックグラウンドスレッドで行い、AssetBundle オブジェクトを直接には作成しません。そのため、この関数を使用して解凍したアセットバンドルをロードすると、CreateFromMemoryImmediate と同じビヘイビアが見られます。

See Also: AssetBundleCreateRequest, AssetBundle.CreateFromMemoryImmediate.

IEnumerator Start () {
	WWW www = new WWW ("http://myserver/myBundle.unity3d");
	yield return www;   
	AssetBundleCreateRequest assetBundleCreateRequest = AssetBundle.CreateFromMemory (www.bytes);
	yield return assetBundleCreateRequest;
	AssetBundle assetBundle = assetBundleCreateRequest.assetBundle;
}