How to get screen relative position in multi-display environment?
Hello guys! This is mi first question on this site - I'm working with Unity since 2018, but my last problem make me feel so helpless.
I'm working on multi-display application, where each display is separated canvas and camera attached to each target display.
There is six displays workstation:
Application is working in fullscreen mode on three displays, in three separated windows, ie 2, 0 and 4 - Display[i].Activate() etc...
On some event I need to move mouse cursor position to confirmation button, which can be on any of canvas - all settings comming from XML config file.
For example: User cause event by mouse on screen 2, then comfirmation box in on screen 0 - I need to move cursos from current position to YES button.
And - what is the clue to get position of canvas element (image renderer) relative to multi-display grid?
Of course, They can be negative if confirmation box is on left to primary screen.
I tried to use GetMonitorInfo() from user32.dll, but it returns all displays in different order - for example display no. 5 in Unity and Windows Setting is on 3rd position in array :/
Greetings!
Bartek.