Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

unity download image from online

void Start(){    
    StartCoroutine(DownloadImage(url));
}

IEnumerator DownloadImage(string MediaUrl)
{   
    UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
    yield return request.SendWebRequest();
    if(request.isNetworkError || request.isHttpError) 
        Debug.Log(request.error);
    else
        YourRawImage.texture = ((DownloadHandlerTexture) request.downloadHandler).texture;
} 
Comment

PREVIOUS NEXT
Code Example
Csharp :: insert keys automatically dictionary in c# 
Csharp :: ASP.MVC display image from SqlServer 
Csharp :: dispathcer in wpf stack overflow 
Csharp :: windowsform mail sender app 
Csharp :: C# Zip large files causes OOM exception 
Csharp :: reflection static method c# 
Csharp :: anidate bucle in c# 
Csharp :: c# webrtc dll 
Csharp :: add new page itext 7 
Csharp :: who is dani? game dev 
Csharp :: binaural generator 
Csharp :: sterge element din coada c# 
Csharp :: set data annotation text in model c# 
Csharp :: c# exec command output 
Csharp :: skrivetænking 
Csharp :: unity oculus vibrate 
Csharp :: c# generic type converter 
Csharp :: how to disable button until the value is selected c# 
Csharp :: send to main args dotnet debug 
Csharp :: PUN 2 Network Transform View Jittery Movement 
Csharp :: How to get 4 end len in string c# 
Csharp :: xamarin forms set the grid row property of an element programmatically 
Csharp :: esaddex34 
Csharp :: Hangfire Creation Table With EFCore 
Csharp :: visual studio auto generate and setters 
Csharp :: internal static object ds 
Csharp :: Remove tabpage by key 
Csharp :: how to select class object from query c# 
Csharp :: prometheus add prefix to metrics 
Csharp :: c# file watcher specific file 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =