//下载AssetBudles资源
string url = Application.dataPath + "/Resources/" + name + ".AssetBudles";
WWW www = new WWW(url);
//可以直接转化u3d使用类型
Sprite temp = www.assetBundle.LoadAsset<T>(name); //where T : Object; --> UnityEngine.Object
//下载图片资源
string url = Application.dataPath + "/Resources/" + name + ".png";
WWW www = new WWW(url);
Texture2D tex = www.texture;
Sprite temp = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), new Vector2(0, 0));
U3D www 下载
最新推荐文章于 2024-02-27 08:34:56 发布