Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Application.LoadLevel() causes crash

Discussion in 'WebGL' started by Naphier, Apr 20, 2015.

  1. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    111
    So... I can't figure this out.
    If I run in the editor, or build development build with explicitly thrown exceptions everything works just fine.
    I'm just trying to load a new scene. Is there some sort of trick to this in WebGL other than simply Application.LoadLevel?

    Really disappointed in the quality of Unity's WebGL. Very slow framerate on Chrome and everything seems really low quality. I hope it gets monumentally better quickly!

    You can see what happens here
    At the end of the game there is a Restart button that simply loads scene 1 (a scene with 3 quads and a cube all textured... same assets that are in scene 0) . Scene 1 loads scene 0 (was trying this because just doing Application.LoadLevel(0) was failing).

    Thanks!

    EDIT:
    So.. If I enable Explicit exception catching then there's no problem.... I've updated the above link so, unfortunately you can't see the reproduction, but it really didn't tell you anything. Seems like a bit of a bug, but I can't find out the exception that only occurs when exception catching is off... :/
     
    Last edited: Apr 20, 2015
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,257
    Which version of Chrome are you using? There's a bug with the latest version (42) related to Unity and WebGL games (see here: https://code.google.com/p/chromium/issues/detail?id=478126&q=unity3d&colspec=ID Pri M Week ReleaseBlock Cr Status Owner Summary OS Modified)

    I tested your game on Firefox and didn't have any issues. Seems like it's the Chrome bug.
     
  3. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    111
    Yeah, it's M42. Could be part of the problem, but it was happening in FireFox too. Deleted all my files from the server, cleared cache, and re-uploaded a build with exception catching on and it runs fine. Just real odd. Real odd. Still frame rate is pretty low on both browsers and even in the examples, can't imagine it's my machine because the specs are pretty high. Thanks for the info on that though. Just hoping things will get much better for this as it's not really a viable port in this state :(