public static void DownLoadVoice(string url, string fileName, int roleId, string successFuncName, string failFuncName) { GameObject go = new GameObject("WWWPortraitLoader"); WWWPortraitLoader loader = go.AddComponent <WWWPortraitLoader>(); loader.StartCoroutine(loader.DownloadVoicePlus(url, fileName, roleId, successFuncName, failFuncName)); }
public static void UploadVoice(string strURL, string fileName, byte[] data, string successFuncName, string failFuncName) { GameObject go = new GameObject("WWWPortraitLoader"); WWWPortraitLoader loader = go.AddComponent <WWWPortraitLoader>(); loader.StartCoroutine(loader.UploadVoicePlus(strURL, fileName, data, successFuncName, failFuncName)); }
public static void LoadOnLinePhoto(string strURL, string successFuncName, string failFuncName, object tex, string shaderName, string defaultIconPath) { GameObject go = new GameObject("WWWPortraitLoader"); WWWPortraitLoader loader = go.AddComponent <WWWPortraitLoader>(); //判断是否是第一次加载这张图片; string imagePath = generateLocalPath(strURL); bool isLocal = false; if (!File.Exists(imagePath)) { isLocal = false; } else { isLocal = true; strURL = "file:///" + generateLocalPath(strURL); } loader.StartCoroutine(loader.DownloadImage(strURL, successFuncName, failFuncName, tex, shaderName, defaultIconPath, isLocal)); }