-
[UNITY] 유니티에서 Image Download 하기Programming/Unity 2021. 12. 16. 19:00
WebClient 클래스의 DownloadFile 기반 함수를 통해 다운이 받아진다.
첫번 째 인자 : 다운받을 링크 주소
두번 째 인자 : 다운받은 파일을 위치시킬 파일 경로
using System; using System.Net; void DownLoadFile(Uri uri, string path, Action<System.ComponentModel.AsyncCompletedEventArgs> onCompleted = null) { WebClient client = new WebClient(); client.DownloadFileAsync(uri, path); client.DownloadFileCompleted += (s, e) => onCompleted?.Invoke(e); }
'Programming > Unity' 카테고리의 다른 글
[Unity] UniRx - WWW 통신을 Reactive하게 관리하자 (ObservableWWW) (0) 2022.05.10 [개발일지] BFS를 활용해서 만든 최단 경로 탐색 툴 (0) 2021.02.27 유니티 성능 프로파일링 최적화 (0) 2021.02.02 유니티 2020.2 기능 정리 (0) 2021.01.21 CupEditor 사용설명서 (0) 2020.03.18