다유
-
[UNITY] 유니티에서 Image Download 하기Programming/Unity 2021. 12. 16. 19:00
WebClient 클래스의 DownloadFile 기반 함수를 통해 다운이 받아진다. 첫번 째 인자 : 다운받을 링크 주소 두번 째 인자 : 다운받은 파일을 위치시킬 파일 경로 using System; using System.Net; void DownLoadFile(Uri uri, string path, Action onCompleted = null) { WebClient client = new WebClient(); client.DownloadFileAsync(uri, path); client.DownloadFileCompleted += (s, e) => onCompleted?.Invoke(e); }