- Home /
How to read uploaded WebGL binary files?
Hi, I want to upload audio to my game via javascript (because of WebGL), and I have my input and everything working, and I can select a file, but how would I pass the file back into Unity as an AudioClip ?
I saw that @alexsuvorov had a lot of posts on WebGL so I'm gonna poke him to see if he can help me...
I've already tried using
URL.createObjectURL()
And even tried using the malloc method as shown in the docs, but I can't seem to convert the binary file into an AudioClip and obviously URL.createObjectURL doesn't work because of browser security.
Your answer
Follow this Question
Related Questions
call C# dll class in plugins from JavaScript 0 Answers
WebGL: Interacting with browser scripting unable to call java script method from C# 2 Answers
Unity 5.6 not calling function when called from webpage 1 Answer
Unity WebGL Error Running on Local Server 0 Answers
Passing array of strings to native JavaScript plugin on WebGL 1 Answer