• 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 Johat · Feb 08, 2015 at 07:17 AM · c#androidnetworkingwindowsusb

How to connect a PC application and an Android application together via USB, so they can talk to each other as if they were networked?

Hi, a bit of an odd request, but a very real problem!

TL;DR: I'm looking for a way to get two Unity projects -- one built on Windows PC and the other on an Android tablet -- to communicate with each other via USB, as if by networking. (And no, Unity Remote is not going to work.)

I'm currently working on a two-screen game, with the main game running on Desktop (PC/Mac) and the second screen app, which functions as the player's controller (amongst other things), on a touch device (Android/iOS).

Think sort of like a makeshift Wii U (see e.g. ZombiiU), but on computer and you can use your own phone/tablet to play.

This is achieved through networking: there are two separate Unity projects -- one building to PC and one to Android -- which then communicate with each other by connecting to the same WiFi network through the Unity Networking API.

This all works great and functions perfectly in regular play. However, when taking the game to shows and events, everything breaks down because there's so much WiFi noise from everyone connecting in a small place. We tend to bring our own WiFi dongle, so it's not having access to a signal that's the problem, it's the sheer noise.

So, for the sake of shows such as this (I've another one coming up soon), it'd be great if I could get around this problem.

Ideally, what I'm looking for is a method to get the PC application and Android application talking to each other when they are connected by USB. In an ideal world, I'd be able to use the same networking API (synchronising states and send RPCs).

I don't need a general solution since this is purely for demoing purposes. So if it helps narrow down the solutions, then I really only need to get this working between one Windows machine (I presume it'll be Windows 8.1, but could be 7) and one Android tablet (it'll be a Nexus 7 2012).

I'm working in C# if that makes a difference.

Any help would be greatly appreciated! Thanks in advance =).

Comment
Add comment · Show 9
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 chetan-rane · Aug 11, 2015 at 06:46 AM 0
Share

did you found any solution?

i am also searching for the same

avatar image P3JX · Aug 12, 2015 at 04:16 AM 0
Share

Connect both application to one SQLLight database. In a shared location in your pc or phone, accessed through usb.

avatar image PennNeuro · Feb 02, 2017 at 03:29 PM 0
Share

I'm still trying to do this. I'm trying to do it so I can send LEAP motion data to the Android, which will be acting as a VR headset. For this reason, the SQL Database won't work for me as I need something super fast.

Thanks!

avatar image hexagonius · Feb 03, 2017 at 10:38 AM 1
Share

you can download Unity Remote 5 from the asset store. maybe it helps understanding how Unity did the connection. I'm afraid it's a native plugin though

avatar image AlixAngarita · Oct 05, 2018 at 03:37 PM 0
Share

@johat Were you able to do it? I'm trying to interface two applications in a kind of similar way.,Were you able to do it? I'm trying to interface two applications in a similar way.

avatar image hexagonius AlixAngarita · Oct 05, 2018 at 06:22 PM 0
Share

that's a comment, not an answer.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 3d - connect android to pc via usb 0 Answers

UNET cannot connect android devices. 1 Answer

Sending a gameobject over network with RPC? 2 Answers

UnityWebRequest and/or HttpWebRequest gives 403 on PUT 0 Answers

How to access a PHP script on XAMPP with the use of Android device? 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