I have 2 cameras (A and B, only A contains uiCamera) and are looking at different objects (A and B) respectively, in different layers. I have collider and OnPress functions on object A.
What I want to do is when object B overlaps object A on the screen (but they are actually in different positions in world space), OnPress will not trigger. However the current situation is the OnPress function triggers because camera A cannot see object B (they are in different layers). Even I include all event masks on camera A, still does not work.
Any solution other than cloning an invisible collider in camera A and keep updating its position with object B. Thank you.