Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Remote Controll between two mobile devices,is that possible?

Discussion in 'General Discussion' started by tansir, Aug 29, 2018.

  1. tansir

    tansir

    Joined:
    Jan 5, 2016
    Posts:
    14
    I'm working on a project, basic features like this:

    Two iOS devices(no windows/mac desktop,just mobile device),

    1.Device B(A) can connect Device A(B), when connect is ok, A will share it's screen to B, and B will show them.
    2.also B can controll A, like When draw shapes on B screen,A show the shape.

    Basiclly these features similar to TeamViewer,but samller.
    I have no idear about this. Can anybody give me some advice?
    Thanks.
     
  2. RichardKain

    RichardKain

    Joined:
    Oct 1, 2012
    Posts:
    1,261
    One will have to serve as the server, and one will have to serve as the client. Also, you aren't going to want to actually "share" the screen, as that would involve a larger quantity of data to stream over a network. As long as you can access the current state of objects that are on A, you can then render those objects however you need to on B. (render them smaller on a mini-map, or a mini display, however it takes your fancy) With these factors in mind, then yes, what you are describing is very much do-able.

    I put together a prototype where a smartphone served as a remote of sorts, and controlled what was happening on a server running on a laptop. The smartphone was the client, and the laptop was the server. Apply the same general concept to two smartphones, and you're good to go. Networking in Unity is not as difficult as you might think.
     
  3. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You can build this functionality on top of any lower level networking API. You'd have to come up with messages you'd send between the two devices to indicate the different types of actions or movements of objects you want to share, etc.

    A big issue when dealing with mobile devices is if they are going to be on the same wifi or not. If so you can have one device act as a server directly. If you want this to work over the cellular networks, they usually don't allow devices to act as servers. In that case you'd need to set up an actual server on the Internet that both devices connect to, which acts as a relay for messages between the two mobile devices.
     
  4. tansir

    tansir

    Joined:
    Jan 5, 2016
    Posts:
    14
    Thanks for your reply.
    our app base on ARkit,so A will send camera stream and other scene data (like model,ui.......) to B, so this feature just like "Share Screen",not just simplely synchronize state of objects.
    and in the future,we will add c,d or ..... client to watch A(no control), and also add voice chat.

    I hope get more from you.Thanks.
     
  5. tansir

    tansir

    Joined:
    Jan 5, 2016
    Posts:
    14
    Thanks for your reply.
    Out app base on ARkit.In fact this app include :
    1.Image from Camera
    2.AR Model
    3.Send control command
    4.Maybe C,D...client will watch what A client show (not control)

    So I wanna know how to set up the Server? What network protocol will be used?.....or Any other SDK/Opensource Project/Solution can solve these problems.

    I hope you can give me a good start. Really appreciate.Thanks a lot.
     
  6. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You should experiment with the available networking API's to see what will work best with your project. You haven't really said anything that would point to answers to your questions.

    The most comprehensive list of what's available is over in the benchmark thread:
    https://forum.unity.com/threads/ben...dgren-miniudp-hazel-photon-and-others.512507/

    I'd avoid Unity's Unet API because it has been deprecated and is scheduled for removal.