UI_2D会有bug,还是使用GIZMOS,3.8.4暂时没有好的办法解决这个问题,后续再说

This commit is contained in:
xu_yanfeng 2025-02-14 13:28:52 +08:00
parent 1f1a01b7c0
commit 4f3a0dc8c8

View File

@ -110,7 +110,8 @@ export class HintV3 extends HintAdapter {
return node;
}
private createCamera() {
const node = new cc.Node("Camera");
const node = new cc.Node("InspectorCamera");
node.layer = this.getLayerID();
const camera = node.addComponent(cc.Camera);
camera.priority = Number.MAX_VALUE;
camera.layer = this.getLayerID();
@ -122,7 +123,7 @@ export class HintV3 extends HintAdapter {
return camera;
}
private getLayerID() {
return cc.Layers.Enum.UI_2D;
return cc.Layers.Enum.GIZMOS;
}
getRectPoints(node: any): RectPoints | null {
if (!node.worldPosition) {