Search Unity

Unity PC/MAC communicate with Android/IOS unity app?

Discussion in 'Scripting' started by Gibbonuk, Feb 1, 2016.

  1. Gibbonuk

    Gibbonuk

    Joined:
    Dec 10, 2013
    Posts:
    175
    Hi, I would like to develop an unity "app" to complement my current unity desktop project. The app isn't the same project, its to be just a simple app that i would like to retrieve a few variables every second or so from the desktop app and show them on the display.

    Being a mac user my initial thought was bluetooth as my mac has it built in, however from what I have read this isn't currently possible? (correct me if I'm wrong?)

    So my other thought is can it be done using wifi, locally? And if so, would this affect my current projects multiplayer capabilities? In other words, can i connect to the mobile app locally AND also be connected online as it does now?

    Any advice would be great.
    Thanks
     
  2. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,531
    This is just networking.

    The game is the server, the iphone/android app is the client. The server waits for requests, and answers back to them.

    There's various ways to do this. .Net/mono has them built in (completely independent of unity... it's using the .net/mono framework which unity has as its scripting environment), so you don't even have to research Unity tutorials... you're looking for straight up .net stuff.

    Options include a Socket server, which is just basic bit streams that you can define your own data format over. Or things like HttpListener which conform to standards like Http. They can span in complexity from very simple to super complex, depending on what it is you want to do.

    If you're defining a very basic, low bandwidth, 1 or 2 function service. A socket server would probably be the easiest to get up and running.

    I recently actually talked about this on these forums... let me see if I can dig up the thread.
     
  3. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,531