WebGL Build : Download file from Web-Service
Hello, I am developing a WebGL application with Unity. I want to download a file from a remote web-service to by using WebGL application to user's local machine. Is it possible ? I've tried using WWW class to send the download request, when I get the response, I've tried to write it to a file. This works on Unity Editor version. However WebGL build does not save anything to anywhere with this way. How can this be achieved ?
Thanks in advance.
Answer by idchlife · Oct 19, 2017 at 02:43 PM
By using layer of js outside of unity which will be connected to unity code via https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html and then just opening in this js separate tab with link for file so it can be downloaded to user's pc