Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Ethan 1 · Jun 29, 2010 at 10:50 PM · mousesdkcursormultiple

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?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image stringa · Nov 15, 2010 at 06:14 PM -1
Share

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?

avatar image yzm stringa · Oct 30, 2015 at 05:48 AM 0
Share

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.

4 Replies

· Add your reply
  • Sort: 
avatar image
1

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image RharryR · Oct 30, 2015 at 05:54 AM 0
Share

Being a .NET developer for 6 years personally i reckon it would be possible. But like you said, it wouldn't be easy.

avatar image
1

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/

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image yzm · Oct 30, 2015 at 05:44 AM 0
Share

kudos on the research

avatar image
0

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

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

http://www.mono-project.com/Interop_with_Native_Libraries

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges