Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Data exchange with other app

Discussion in 'Multiplayer' started by vincent_bouxak, Jul 20, 2017.

  1. vincent_bouxak

    vincent_bouxak

    Joined:
    Jul 20, 2017
    Posts:
    3
    Hi,
    i'm just graphic designer with beginner level of code, i would like use unity3d to dev a real-time environment with some interactions, as player click on an object, do something, that's not a problem, but i would like to send variables data (boolean, strings, float, int) to another application (non-unity3d) dev by another mate (he coding in QT/QML/C++ - that's more his job than me coding ^^). Both application should run on a same windows OS, in standalone.

    I know how to read/write a file to disk, but i think that's not the right method for realtime (even if a slow rate is needed). My mate doesn't know anything about unity at the time.

    What's the process (network, direct connection...?) i should search and the functions i should search/learn documentation about ?
    Thank you to indicate me where is the lighthouse ^^
     
  2. TwoTen

    TwoTen

    Joined:
    May 25, 2016
    Posts:
    1,168
    Seems like you want to communicate data on the same PC. Doubt networking is needed. easiest way to prototype is file polling. Really depends what the data is and at what rate you are sending it.
     
  3. vincent_bouxak

    vincent_bouxak

    Joined:
    Jul 20, 2017
    Posts:
    3
    Yes, on the same PC. The rate will be quite slow, that's should be like an old adventure game in a single room (main goal is an industrial machine simulator for teaching), with some states and actions like 'light#1 on, button#12 is pushed, item #8 have a problem while the second application will report these states and launch actions to do in the unity app : nothing like an fps, but i worrying about a read/write to a single file by two applications at the same time ^^.
    If a network way can do the job that's not bad, because this can open me opportunity later to run the unity on one and the command/report application on another (for two users)
     
  4. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    I'd go with network message passing via sockets. LLAPI should be enough for that purpose. That's if you're going to extend your application beyond one machine.

    Otherwise - look on the internet on how to get around Shared Access Violation. There's plenty of information in C# about it.
     
  5. vincent_bouxak

    vincent_bouxak

    Joined:
    Jul 20, 2017
    Posts:
    3
    ok, i'll search these ways ! thank you
     
  6. aabramychev

    aabramychev

    Unity Technologies

    Joined:
    Jul 17, 2012
    Posts:
    574
    do search for "named pipes". It will be faster than sockets.
     
    vincent_bouxak and TwoTen like this.