[SOLVED] Errors after change scene when i use pc.Picker to select entity

my project have three scene,i use pc.Picker to select entity, i give a script to camera in every scene,then i export my project,when first scene, select a entity is normal, but if i change scene, when i click entity to select,there is a error like some down eg

This usually seems to happen when subscribing to app level events and changing scenes. As the scenes are deleted and recreated, the old scenes are still subscribed to the app level event, but the objects they are referencing no longer exist.

Consider using app.off and passing the relevant event name and function, or subscribing to entity level events to prevent this error in the future:

1 Like

thank u ,you are right,it need off event whene destroy,now it is normal