Search Unity

  1. All Pro and Enterprise subscribers: find helpful & inspiring creative, tech, and business know-how in the new Unity Success Hub. Sign in to stay up to date.
    Dismiss Notice
  2. Dismiss Notice

Since Update Weird WebGL Errors

Discussion in 'WebGL' started by Picky-Salamander, Sep 15, 2015.

  1. Picky-Salamander

    Picky-Salamander

    Joined:
    Apr 26, 2013
    Posts:
    27
    We recently updated all of our Unity builds to 5.2.0 from 5.1.0 and our WebGL builds are having some weird errors that don't seem to make a lot of sense. We've tested the build on our other platforms (Android, Web Player, and iOS) and they don't have any problems that we can see. The issues seem to stem from WWW calls which fail if done at the same time or in certain orders (we have about 5 different files and bundles that need to be downloaded). One of the errors is listed below:

    I did disable the stripping of engine code which was giving us some problems, but that didn't fix these issues. We're also getting issues with loading scenes and animations. Animation errors (characters just don't animate) don't seem to generate any errors, but the scene loads do and we get an error like below:

    I'm attempting to go back to 5.1.0 to see if that has any affect, but I would very much like to use some of the new features/fixes in 5.2.0. Are these errors indicative of anything? If I had to guess maybe something is getting stripped or there is a problem with the WWW class?

    Thanks for the help!
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    I think It's a bug we already fixed.

    To confirm that, could you please try the following:
    - make a development build
    - using a text editor, open the big js file in the Development folder
    - find this function
    Code (csharp):
    1.  
    2.     JS_WebRequest_Release: function (request)
    3.     {
    4.         delete wr.requestInstances[request];
    5.     }
    6.  
    - replace it with
    Code (csharp):
    1.  
    2.     JS_WebRequest_Release: function (request)
    3.     {
    4.         var http = wr.requestInstances[request];
    5.  
    6.         http.onload = null;
    7.         http.onerror = null;
    8.         http.ontimeout = null;
    9.         http.onabort = null;
    10.         delete http;
    11.  
    12.         wr.requestInstances[request] = null;
    13.     }
    14.  
    - open/reload index.html in your browser
     
  3. Picky-Salamander

    Picky-Salamander

    Joined:
    Apr 26, 2013
    Posts:
    27
    That seems to fix the web request issues, but we're still having difficulty getting animations to work. Characters don't seem to have any animations coming with them into the builds. Is there anything that has changed since 5.1.0 which would cause this?

    EDIT: I've also confirmed that our WebGL builds work perfectly in 5.1.0.
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,647
    There are no known issues with animations in WebGL. Please check if it is only webgl or other build targets as well, and file a bug.
     
  5. Picky-Salamander

    Picky-Salamander

    Joined:
    Apr 26, 2013
    Posts:
    27
    FYI, I determined the cause for the animation issues: It appears that a 5.2.0 build of WebGL doesn't like 5.1.0 asset bundles, they were causing weird issues. After building the bundles 5.2.0, the problems went away.
     
unityunity