Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

WebGL Memory Load error

Discussion in 'WebGL' started by JokesOnMe, Jul 22, 2016.

  1. JokesOnMe

    JokesOnMe

    Joined:
    Feb 7, 2015
    Posts:
    4
    Hey everyone, I'm at the end of options that I can attempt. We recently started using WebGL and Unity 5.3 Everything in our scene appears to run correctly. Internally, our code makes a WWW to download some audio for one of our characters. However, I need to change that WWW call to reference an https instead of http location. The moment I do that, the scene does not load anymore and I get an error of "Cannot enlarge memory arrays....blah blah". I've tried allocating more memory (the max allowed by the browser), allowing memory growth, and setting the module memory to be larger. Same error. We've served https content before. Odd thing is, change that WWW call back to our http location and the scene loads just fine with the exception of the audio not being there because it's an http location while the webpage is https. Given that we serve other https content, I can't imagine our server is configured incorrectly. Has anyone ever seen this? Thanks.
     
  2. alexsuvorov

    alexsuvorov

    Unity Technologies

    Joined:
    Nov 15, 2015
    Posts:
    327
    Hello JokesOnMe.

    Different protocol is treated as different origin, even if the domain name matches. If your document page is served via http and you are trying to access a resource via https (using WWW) from the same server (or vice versa), you should properly setup CORS headers for the requested resource. Also note that under certain conditions request to a https resource can be preflighted by the browser (if this is the case, the server should also properly handle OPTIONS requests). You can use the browser network profiler (can be normally accessed via Developer Tools) to check if the resource is being served properly. Even though you see a memory related error message in the console, it can be caused by the incorrectly loaded content.
     
    Last edited: Jul 22, 2016