feat: 当Camera.for获取的摄像机被禁用时,不会抛出警告

This commit is contained in:
unanmed 2024-10-08 20:46:00 +08:00
parent 7df1ff494d
commit b720c9e032
2 changed files with 3 additions and 2 deletions

View File

@ -80,7 +80,8 @@ export class Camera extends EventEmitter<CameraEvent> {
this.destroy();
});
if (Camera.cameraMap.has(item)) {
const ca = Camera.cameraMap.get(item);
if (ca && !ca.enabled) {
logger.warn(22);
}
}

View File

@ -43,7 +43,7 @@
"19": "Repeat light id: '$1'.",
"20": "Cannot apply animation to camera operation that is not belong to it.",
"21": "Cannot apply transition to camera operation that is not belong to it.",
"22": "There is already a camera for delivered render item. Consider using 'Camera.for' to avoid some exceptions.",
"22": "There is already an active camera for delivered render item. Consider using 'Camera.for' or diable the active camera to avoid some exceptions.",
"23": "Render item with id of '$1' has already exists.",
"1001": "Item-detail extension needs 'floor-binder' and 'floor-damage' extension as dependency."
}