We started testing the UI stuff, and our multi-scene game runs into trouble when re-loading a scene.
We get this error in the console, after which objects are created but none of them will have initialize called (presumably because of this UI related excpetion).
A lot of our code relies on initialize so for now it looks like we can’t use the UI, unless we’re doing somethign wrong? The UI we’re using is a single textbox.
The flow that causes it:
- start in menu scene (with no UI)
- open scene with UI textbox
- go back to menu
- open scene with UI textbox again
- crash
launch.js:6281 loadScene (editor.method error)
launch.js:6282 TypeError: Cannot read property 'lock' of null
at VertexIterator (playcanvas-stable.dbg.js:3284)
at TextElement._updateMesh (playcanvas-stable.dbg.js:28050)
at TextElement._updateText (playcanvas-stable.dbg.js:28011)
at TextElement.set (playcanvas-stable.dbg.js:28359)
at TextElement._onFontLoad (playcanvas-stable.dbg.js:28218)
at Asset.fire (playcanvas-stable.dbg.js:608)
at Array.<anonymous> (playcanvas-stable.dbg.js:30781)
at ResourceLoader.<anonymous> (playcanvas-stable.dbg.js:28694)
at playcanvas-stable.dbg.js:29865
at ResourceLoader.load (playcanvas-stable.dbg.js:28679)