先介绍一种常用的加载AssetBundle方法 using UnityEngine; using System.Collections; using System.IO; public class LoadUnity3d : MonoBehaviour { // Use this for initialization void Start() { StartCoroutine(LoadScene()); } // Update is called once per frame void Upda…
[加载 AssetBundle 的四种方法] 1.AssetBundle.LoadFromMemoryAsync(byte[] binary, uint crc = 0); 返回AssetBundleCreateRequest.Use assetBundle property to get an AssetBundle once it is loaded. Compared to LoadFromMemory, this version will perform AssetBundle deco…
using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; using UnityEngine.Networking; public class DownLoad : MonoBehaviour { IEnumerator Start() { //资源包路径 string path1 = "AssetBundles/cubewall.unity3d"; /…
下面代码列出了对于assetbundle资源的常用操作,其中有针对bundle.asset.gameobject三种类型对象的操作,实际使用中尽量保证成对使用. 这一块的操作比较繁琐,但只要使用正确,是可以保证资源完全没有泄露的. using UnityEngine; using System.Collections; public class TestAssetBundle : MonoBehaviour { public string AssetBundleName = "cube1.ass…