There is an error to launch a project on 1.64.3,is it a bug?

Hi,
I just launch a project found the error warning on version 1.64.3, but it has no any error before even I change the engine vertion back to 1.64.2 or 1.63.6 it was correct. Is it an error on version 1.64.3?

[UI.js?id=137031414&branchId=d7edae09-2d48-43b5-a125-1310092bcfb6:10]: Cannot read properties of undefined (reading ‘UI.css’)

TypeError: Cannot read properties of undefined (reading ‘UI.css’)
at Ui.initialize (https://launch.playcanvas.com/api/assets/files/scripts/scripts_x/Page/HTML/UI.js?id=137031414&branchId=d7edae09-2d48-43b5-a125-1310092bcfb6:10:62)
at ScriptComponent._scriptMethod (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:95736:22)
at scriptType.set (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:112510:50)
at ScriptComponent._checkState (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:95703:23)
at ScriptComponent.onEnable (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:95640:11)
at Entity._onHierarchyStateChanged (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:61775:24)
at Entity._notifyHierarchyStateChanged (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:61745:11)
at Entity.set (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:36225:17)
at MoveBetweenPoints.update (https://launch.playcanvas.com/api/assets/files/scripts/scripts_x/Camera/move-between-points.js?id=137031857&branchId=d7edae09-2d48-43b5-a125-1310092bcfb6:180:60)
at ScriptComponent._scriptMethod (https://code.playcanvas.com/playcanvas-1.64.3.dbg.js:95736:22)

Thanks

Your UI.js is using private API of the assets registry assets._names. This is a private API that has been changed in the recent release.

Private API can change any time without notice, so it is better not to use it, if you can avoid it. I’d recommend to change your code to use public API instead. Considering the functionality you showed, it doesn’t seem like using private API is justified. You can achieve the same result with a public API just as well.

Please refer to AssetRegistry API to learn how to locate your assets. You probably want to use .find() or .findByTag() methods.

1 Like

Thank you very much. I will try it.