Version: 2017.3

WWW.assetBundle

切换到手册
public AssetBundle assetBundle ;

描述

流式传输一个 AssetBundle,它可以包含项目文件夹中的任意类型的资源。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { IEnumerator Start() { using (WWW www = new WWW("http://myserver/myBundle.unity3d")) { yield return www;

// Get the designated main asset and instantiate it. Instantiate(www.assetBundle.mainAsset); } } }

另请参阅:AssetBundle 类。