Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by Milad · Feb 23, 2010 at 03:31 PM · hardwareusb

how can i directly access USB/COM in unity?

Hi.

I have a FPS game with a gun in game. i want to have an external gun that connects to usb/com port. i want to use the gun for input in my game and allow the players to use the gun for playing the game. something like Wiimote of Wii console but with my own hardware. is it possible or not?if yes, how?

so thanks.

Comment
Add comment · Show 6
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 Ashkan_gc · Feb 23, 2010 at 08:02 PM 0
Share

is the device a popular one. does it have any special driver in C++ or you want to process raw data from USB? (i voted up your question to help)

avatar image Milad · Feb 24, 2010 at 07:16 AM 0
Share

i am looking for a driver or library for that.i want gat info from usb or com port.so thanks for VOT$$anonymous$$

avatar image AngryAnt ♦♦ · Feb 24, 2010 at 09:24 AM 0
Share

Yes, but what Ashkan was asking was which external gun are you referring to? A wiimote based one perhaps? Theres a library for that on the wiki. Hardware interfaces vary a lot - that is why you don't get all systems supporting all hardware out of the box.

avatar image Milad · Feb 24, 2010 at 10:16 AM 0
Share

I need both of them.means that wiimote and my gun.what must i do exactly? if you can gave the library link please. so thanks.

avatar image Milad · Feb 26, 2010 at 10:09 AM 0
Share

i need more help please.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Shawn · Feb 23, 2010 at 05:12 PM

I would think this would be possible; there are various libraries out there for communicating with com/usb devices through C# .NET which you could leverage to do something like this. You could possibly look into having your device emulate the mouse and keyboard as well and just hook into those same inputs. For example when I was doing some controller tests with a proprietary engine which did not support USB game pads I used a mouse/keyboard emulator for that gamepad and then hooked into the mouse/keyboard events for the corresponding actions.

It is really going to depend on the device you are working with, your knowledge of .NET, and the drivers provided for the device you are working with.

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 Ashkan_gc · Mar 04, 2010 at 06:12 AM

find the driver for your device if you really have a known device to use. for using wiimote you can use uniwii. the unify community wiki is a good place to search for scripts and articles that you need.

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

No one has followed this question yet.

Related Questions

Sending messages to DMX 1 Answer

Unity3d vs Custom USB Joystick 0 Answers

Joystick count limit 1 Answer

Can you Build & Run for Windows Phone just like for Android via USB cable? 0 Answers

Unity - IOException: SerialPort.Open() 0 Answers


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