I have a problem with SceneManager.LoadSceneAsync in Unity 5.6.0 WebGL build only.
Works fine in the Editor and desktop and used to work fine in Unity 5.3 WebGL and Webplayer builds.
When using it in some projects and not others it doesn’t activate any of the objects from the loaded scene.
It also works fine in Unity 5.6.1, 5.6.2, 5.6.3 and 2017.1 but not in 5.6.0
Unfortunately 5.6.1 and above have other bugs that prevent me from using them to solve the problem.
I can’t find a patch for 5.6.0 that fixes this so does anyone know of any work around to get a loaded scene to activate the objects loaded from it?
It seems to completely load ok, I can put a debug statement after the yield and that shows up fine. But any debugs in any Start functions of any loaded object fail to appear and neither does any of the geometry in the loaded objects
I’ve seen a few similar threads but nothing in any of those appear to work in my instance and all seem to relate to older versions
I’ve yet to pin down the cause and make you a repro case as I’ve been tied up with this issue. But something has changed with something to do with cameras or render textures or replacement shaders. So in 5.6.0 I have a function that renders the scene using a replacement shader from multiple angles into a bunch of render textures and I then count the number of pixels in the result to find the angle where the object is largest, in 5.6.1 and above that no longer works the same. It’s very involved to pin down the issue so I reverted to 5.6.0 where it still works - has been since 3.5 - only to get hit by this loading problem. Stuck between a rock and a hard place…
With regard to the loading issue, I have 12 projects all with identical code but different scene objects, 9 of them work fine and 3 exhibit the issue described above.
I’m currently trying 5.5.4 and 5.6.0p4 in the vain hope that everything works in one of those builds.
Bug report - Case 948147
Seems to be something to do with changes to when OnPostRender() is called.
If this was a deliberate change I wonder
A. Why was it done in a minor point release, seems a big change to just slip in unannounced
B. Why was it not documented somewhere, or maybe it is and it’s very hard to find
Going to try a work around using coroutines to wait for the end of the frame which seems to work in my test case.
That does not seem to be a webgl-specific issue but, anyway, are you on the latest patch?
EDIT: also, what version of Unity is that? I have been told the compilation pipeline has been rewritten in 2017.1 and we haven’t been able to reproduce it there.
Going back to 2017.1 changing platforms, seemed to force it to recompile.
However I then made one change to a script and it’s gone back to being frozen again…