- Home /
What is the best way to do inter-process communication in Unity?
I have a heart rate device with some custom software I wrote that I want to use as an input to a Unity game. The problem is that the software is written in .Net 4.5 so I can't put the code straight into my Unity project. So I'll have to run it as a separate app and get the data to my Unity game, the question is, how?
I assume I'll have to create a local TCP server, the next step I'm not sure what would be the best option so I thought I'd ask for some help before I dig a rabbit hole.
There's not a huge volume of data, just BPM etc. So far I've looked at local sockets, message queues and Unity's networking but I'm not sure which would be best.
Any ideas?
Answer by ProgramYourFace · Nov 03, 2015 at 05:27 PM
I was working with this as well and I ended up using TCP sockets. I tried using NamedPipes but I guess Unity dose not support it, TCP sockets work pretty well. I would recommend you read up on them as much as possible because they have a lot of gotchas. They work fast enough for sending texts through. MSDN
Your answer
![](https://koobas.hobune.stream/wayback/20220611232847im_/https://answers.unity.com/themes/thub/images/avi.jpg)