- Home /
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 =).
did you found any solution?
i am also searching for the same
Connect both application to one SQLLight database. In a shared location in your pc or phone, accessed through usb.
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!
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
@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.
Your answer
Follow this Question
Related Questions
Unity 3d - connect android to pc via usb 0 Answers
Online level database 2 Answers
GetAllNetworkInterfaces returns empty list 1 Answer
Question about Network.Destroy 0 Answers
Multiple Cars not working 1 Answer