![]() So I think the problem must lie in the difference between a) executing the Coroutine with a reference to an URL string that is generated in the code (as in my initial setup, which didnt work) and b) executing the Coroutine with an URL in plain text (i.e. 'postURL', while copying the URL that 'postURL' generates does get the desired result.īut obviously it then inserts the variables as defined in that instance, rather than the actual variables from the game at the moment the Coroutine is called. ID is indeed nullable, that works fine as well.ĭespite the empty return when I tried ur first suggestion, it didn't create a new row in my database.īasically, in my inital setup a working URL is created, but for some reason it won't work using the reference to In these cases, all fields get populated correctly. ago Means: Check your potato router, restart Steam, reconsider your life choices. Will this fix itself eventually or what 5 8 8 comments Best Add a Comment MRRdwan 4 yr. When I paste the generated URL in my browser, it creates a row in my database.Įven when I paste that URL in text in my code, rather than the reference to 'postURL', it creates a new row when the Coroutine is called. What is cannot connect to destination host supposed to mean Server list is not loading as a result, i cant play this game. Im using phpmyadmin so I can see whether my entry works or not by simply refreshing and checking whether a new row was added. Thanks again for the reply and suggestions. $_GET has a url length limit(if your still using it), you're probably not in danger of reaching it but its always a possibility with how your server is setup. What was your script with less variables that worked. If you remove | `id` |, from | MyTable (`id` |, you wouldn't need to insert null ![]() that's probability your key and might be a possible error. Is id Nullable? i see your trying to insert null into id. Is that your whole php script? if your using sessions you'll need a work around. Use print_r($_POST) to see if something is wrong.Įcho the sql result to see how many rows where updated.Įcho the sql string copy the string and use a php query in a editor like phpmyadmin or heidisql to see if it throws any errors when you manually try using that string. If only part of the data is being populated make sure your sql fields are correctly typed, sql is case sensitive. ![]() You only need to phrase things in unity, php will automatically phrase things correctly.(then again i dont know about bytes)Īn empty return is what you want correct? i dont see any errors and you dont have any echos I dont use bytes i phrase everything as a string, it should work either way but i only know that string works for me. The main difference with the test scenario is that in that case, I inserted the variables immediately in the StartCoroutine function whereas this function in my current situation is made up of variables (INT and FLOAT) that are defined elsewhere.įeel free to ask questions if necessary. This is stored in the same location as the code I used for the test with less variables (which worked) and is basically set up the same. ![]() The code that is supposed to be executed is php code. Also, when I copy the URL (test.text) in my browser it returns no errors, and when I remove 1 variable from the URL it gives a notice that it is missing that variable. = downloadedTexture ĭebugText.This worked fine in a previous test with less variables. " webRequest.error ", \n" m_LocalFileName ĭownloadedTexture = ((DownloadHandlerTexture)webRequest.downloadHandler).texture If (webRequest.isNetworkError || webRequest.isHttpError)ĭebugText.text = "Error getting texture. Yield return webRequest.SendWebRequest() UnityWebRequest webRequest = UnityWebRequestTexture.GetTexture(m_LocalFileName) ScreenCapture.CaptureScreenshot("screenshot.png") M_LocalFileName = Application.persistentDataPath "/screenshot.png" Here is my code: public void MostrarCaptura() The image is there, and when i check if it exists there is no problem. It works perfectly on the editor and on PC build, but on Android it cannot get the image, just says "Cannot connect to destination host". I need to get a texture using UnityWebRequest from Application.persistentDataPath and apply it to a plane in the scene.
0 Comments
Leave a Reply. |