- Home /
Multiple mice in Unity
I know multiple mice interfaces can be implemented in Flash through a C# workaround with the Microsoft WPF. Can the same be done with Unity?
I'm confused why there is a SD$$anonymous$$. $$anonymous$$ulti-input devices are supported at the Win32 level. Why is there an sdk needed?
I think the SD$$anonymous$$ is only for the Cursor and "Focus" events (which are actually different from the input device itself). I.e. which window gets keyboard events if you have multiple mice and each clicked on a different window or form field and stuff like that.
Answer by qJake · Jun 30, 2010 at 12:38 AM
No. Unity only has support for a single pointing device. It also only supports one keyboard, and I believe up to 4 joysticks/gamepads, though I could be mistaken.
The best you could try is writing a C++ plugin to handle it, which requires Unity Pro, and a fairly extensive understanding of the Unity subsystem, though even then I'm not sure it would work.
Being a .NET developer for 6 years personally i reckon it would be possible. But like you said, it wouldn't be easy.
Answer by petersvp · Oct 29, 2015 at 11:53 PM
Of course it is possible, you have to implement custom C DLL for DLLImport, or a custom C# DLL. And somebody did this already: https://alastaira.wordpress.com/2015/08/04/multiple-mice-input-in-unity/
Answer by Ashkan_gc · Jul 28, 2010 at 05:21 AM
i don't know anything about the workaround that you are talking about but you can write a service/app to handle it and then communicate with unity using sockets.
Answer by yoyo · Nov 15, 2010 at 05:55 PM
Microsoft has an SDK for multiple mouse support, available here ... http://www.microsoft.com/multipoint/mouse-sdk/default.aspx
I'm not sure if dllimport would be sufficient to call this from Unity (but I'd love to hear from you if you try it :-)
http://msdn.microsoft.com/en-us/library/aa288468(VS.71).aspx
Your answer

Follow this Question
Related Questions
Unity 3D Screen.lockCursor Problems 2 Answers
Alt+Tab pointer problem 0 Answers
How to center custom cursor 2 Answers
error CS8025: Parsing error 1 Answer
How to make something happen when mouse on side of screen? 1 Answer