public void setTexture(GameObject go, string path, string isLocal) { if (isLocal == "local") { LoaderPool.InnerLoad(path, SimpleLoadDataType.texture2D, onLoaded, go); } else { LoaderPool.OutterLoad(path, SimpleLoadDataType.texture2D, onLoaded, go); } }
public void setTexture(RawImage go, string path, string isLocal) { if (go == null) { Debug.LogWarning("setTexture RawImage go == null"); return; } if (string.IsNullOrEmpty(path)) { Debug.LogWarning("setTexture path == null"); return; } if (isLocal == "local") { LoaderPool.InnerLoad(path, SimpleLoadDataType.texture2D, onLoaded, go); } else { LoaderPool.OutterLoad(path, SimpleLoadDataType.texture2D, onLoaded, go); } }
/// <summary> /// /// </summary> /// <param name="path"></param> /// <param name="type">加载类型 0本地Resouce 1本地StreamingAsset 2远程</param> /// <param name="data"></param> public void LoadPrefab(string path, int type, Action <UnityEngine.Object, object> Loaded, object data = null) { onLoaded = Loaded; bringData = data; if (type == 0) { loadpath = path.Split('.')[0]; UnityEngine.Object obj = GameObject.Instantiate(Resources.Load(loadpath)); if (Loaded != null) { onLoaded(obj, bringData); } } else if (type == 1) { loadpath = "UI/panel/" + path; LoaderPool.InnerLoad(loadpath, SimpleLoadDataType.prefabAssetBundle, OnLoaded, null); //loader.Load(); } else { Debug.LogWarning("目前只有本地"); } }
public Mode2DPrefabs() { LoaderPool.InnerLoad("2D/prefab/iconbase2d.assetbundle", SimpleLoadDataType.prefabAssetBundle, onloaded, null); }