Questions tagged [unitywebrequest]
97 questions
5
votes
2 answers
How to get download progress using UnityWebRequest to download Asset Bundle from server?
I still new using UnityWebRequest to download and load asset bundle from server container. The problem is the value for the download progress always 0.
How can I get the value for download progress?
Code Below what I try to download and get the…

Sharafiq Sharif
- 51
- 1
- 1
- 2
4
votes
2 answers
Unity WebGL UnityWebRequest Bad Body Data
I have a Unity game hosted on a web publishing platform. This game connects to several APIs, including Microsoft PlayFab, Google Analytics, and our own back end server. Sometimes (very rarely, less than 0.1% of the time) the game fails to connect…

Giawa
- 1,281
- 1
- 10
- 21
3
votes
3 answers
UnityWebRequest POST not sending Body
As the title says, the code is as below. I have tried setting chunkedTransfer=false, Content-Type application/json, WWWForm, building the JSON object manually, and HttpClient. For Content-Type application/json, the API isn't even hit. For the rest,…

Rory L.
- 308
- 2
- 13
3
votes
3 answers
UnityWebRequest: how to get/set cookies
The links you can get on google and stackoverflow are very old (2009).
Between 2009 and today, a lot of things have been solved / improved.
So my question is: how to get/set cookies using UnityWebRequest with the latest Unity version?

Olivier Pons
- 15,363
- 26
- 117
- 213
2
votes
0 answers
Sending data to and receiving data from localhost in Unity caused "IOException: Too many open files" error
To test the networking part of my Unity application, I have an "imitatee" game object that moves according to the keyboard input. The networking manager component (1) gets the movement data of the "imitatee" and sends it to a node.js localhost…

Xi Liu
- 559
- 9
- 18
2
votes
0 answers
UnityWebRequest returns different errors for right urls
I'm using UnityWebRequest to download asset bundles from my server. Sometimes the following code returns different exceptions such as Failed to receive data , Cannot resolve destination host, Cannot connect to destination host, Unknown Error,…

Gag Baghdasaryan
- 716
- 1
- 11
- 22
2
votes
1 answer
Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'Value[]' because the type requires a JSON array (e.g. [1,2,3])
I'm struggling with this exception.
I'm trying to get some info from a json file and get some C# object out of it. But for some reasons, Unity does not allow me to deserialize it.
Here's my C# code:
IEnumerator SendRequest(string urlParam,…

NicolasM
- 77
- 6
2
votes
0 answers
How Can I Download Multiple Files With Unity Web Request?
I want to download multiple files with different extension file types from the server with unitywebrequest and show progress with progress bar.
maybe I need a list or dictionary to add my files URL, but how?
I can do it with one file by this…

Rooz
- 215
- 3
- 13
2
votes
0 answers
Unity 2019 - UnityWebRequest error loading texture with space and plus on path
I'm using Unity 2019 and I made a script that load a texture from the pc with "UnityWebRequest".
using (UnityWebRequest uwr = UnityWebRequestTexture.GetTexture(finalPath))
{
yield return uwr.SendWebRequest();
if…

G. Threepwood
- 454
- 8
- 23
2
votes
2 answers
Unity WebGL POST requests does not work after build the game
my unity webGL Game doesn't seems sending post request to the server when after build the game, but its working fine in the editor. Is there anything to do additionally than this?
IEnumerator PostRequestY(string url, string jsonToAPI)
{
…

Sakuna Madushanka
- 168
- 16
2
votes
1 answer
UnityWebRequest never returns on script attached to a prefab
I have a IEnumerator function that download a image from a server, on script not attached to prefabs, it works, but on script attached to prefabs, it doesnt work.
By doesnt work i want to say that the www.SendWebRequest() never returns, i've waited…

Gabriel Sandoli
- 23
- 3
2
votes
2 answers
UnityWebRequest POST not sending to ASP.NET API
I'm working on POSTing data by using UnityWebRequests. Unfortunately this isn't working, although I do not receive any errors.
I've made an API with ASP.NET Core which is working (tested with Postman). I tried multiple "solutions": sending bytes,…

Kevin
- 31
- 2
1
vote
0 answers
A Native Collection has not been disposed, resulting in a memory leak
A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeArray`1:.ctor(Byte[],…

Pythoner
- 11
- 2
1
vote
0 answers
Unity Web Request Post
I am trying to post request via UnityWebRequest.Post method but got this error
"Curl error 1: Received HTTP/0.9 when not allowed".
Below mentioned is my code:
WWWForm form = new WWWForm();
form.AddField("username",…

Asmar Ali
- 35
- 6
1
vote
0 answers
UnityWebRequest: Null response
So I have a website(it is unsecured/it doesn't have an SSL certificate) where I have a php script that echo's some info of my database. Here is it:
$query = "SELECT id, password FROM users WHERE username = ".$_GET['uname'];
$result =…

CrisDev
- 11
- 5