流式传输一个 AssetBundle,它可以包含项目文件夹中的任意类型的资源。
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { IEnumerator Start() { using (WWW www = new WWW("https://myserver/myBundle.unity3d")) { yield return www;
// Get the designated main asset and instantiate it. Instantiate(www.assetBundle.mainAsset); } } }
另请参阅:AssetBundle 类。