CodePudding user response:
Say specific pointCodePudding user response:
How is the UI scene? UI should be canvas and so on, this kind of circumstance, you should go to see if ray emission place have a judgment, or look for on the UI is added startsCodePudding user response:
I can think of method, there are twoFirst, the UI layer in the layer above the game scene, so click on the UI will not have influence upon the game scene;
Second, when the UI interface under the condition of existence, the game scene for mouse events get suspended, namely in front of the mouse events for the determination of whether a UI interface open
CodePudding user response:
The UI object Layer is set to "UI"Using radiographic testing to do click
Physics. RayCast LayerMask parameter selection "UI"