[]CameraMoveScript,父对象Camera移除removeAllComponent后,还会继续获取鼠标事件

this.m_scene = new Laya.Scene();
this.m_sceneCamera = new Laya.Camera(0, 0.1, 100);
this.m_sceneCamera.transform.translate(new Laya.Vector3(-40, 50, 60));
this.m_sceneCamera.clearFlag = Laya.BaseCamera.CLEARFLAG_SKY;
this.m_sceneCamera.addComponent(CameraMoveScript);
this.stage.addChild(this.m_scene);
this.m_scene.addChild(this.m_sceneCamera);


在destory的时候
this.stage.removeChild(this.m_scene);
this.m_sceneCamera.removeAllComponent();
this.m_scene.destroy();
this.m_scene = null;

只会这个CameraMoveSprite还会被触发鼠标事件,然后就崩溃了
已邀请:

Monica - 知识达人

赞同来自:

问题已收到,之后我们测试下再回复你。谢谢反馈

要回复问题请先

商务合作
商务合作