I have a problem I cannot seem to resolve with UI elements using additive scene loading.
Here is the example: https://playcanv.as/p/oDty5oVh/
Press the Red button to load the Red scene. You can click on the two smaller boxes to show their names in a floating UI panel - Bob and Billy. Now, if you click on the Blue button to load the Blue scene and then again the Red button the load the Red scene, the functionality on the 2 boxes no longer works as expected.
We get the following error:
ui-manager.js:23 Uncaught TypeError: Cannot set properties of undefined (setting ‘text’)
at i.UiManager.settext (ui-manager.js:23:29)
at i. (ui-manager.js:13:14)
at i.e.fire (playcanvas-stable.min.js:6:11885)
at e.i.raycastFirst (playcanvas-stable.min.js:6:1078578)
at i.Picker.onSelect (picker.js:19:32)
at e.fire (playcanvas-stable.min.js:6:11885)
at e.i._handleDown (playcanvas-stable.min.js:6:1233344)
It appears that the Text Element no longer exists on the entity. Puzzled as to why.
Here is the sample project: https://playcanvas.com/project/917187/overview/scene-load-tests
Any help would be appreciated.