- Home /
Listen for clicks outside of unity application
Hi, I am building an overlay application for Windows using Unity. I want my overlay to listen for clicks, even when another window is in focus.
As far as I experimented, Input.GetMouseButtonDown(0) and other Event KeyCodes only work while unity app is in focus. Soon as I click another window, it stops getting events. I know it does make sense, as recording clicks in another process is uncommon and unthrusted.
Anyhow, does someone know of another way to listen for mouse input, with a Unity app running in background ? Maybe using user32.dll or another Windows library?
EDIT: On the same issue of capturing events outside the app, you surely know about pressing alt+r to bring the Nvidia game overlay - any idea how this can be achieved ?
Your answer
Follow this Question
Related Questions
What is the correct location for a native (C++) plugin's DLL dependencies 1 Answer
dll doesn't work after build 0 Answers
how to release dlls? 1 Answer
App goes to the background when an external process causes error. How to keep app foreground? 0 Answers
How to know the event that mouse click on a EditorGUILayout.ObjectField(...)? 1 Answer