- Home /
Create Data Connection From External Program?
Hi,
I am fairly new at unity, and am looking to use it as a way of displaying in real time information from another program.
Basically what i have is a radar examining the test environment in real time, then a VS2010 program which processes the returned signal, and determines where objects in the environment are located.
Once the coordinates of the object are known, i would like to pass this to the UNITY gaming engine in real time. The game I have created is a representation of the real-world test area.
Basically what i am wondering is what is the best way to connect the data between the two programs?
I have looked at some of the Networking functionality within Unity, however, i am unsure whether i should be attempting to set up the c++ program as a server or a client? and how to make the c++ program behave correctly as either.
I have also considered polling a file which is updated by the C++ program, however, this would surely introduce some severe delays and possible data corruption with two programs simultaneously accessing the file?
Im not sure if what i am attempting to do is even possible?
Any thoughts, pointers, advice etc greatly appreciated!
Cheers,
Cal
Networking is a viable option. I'd personally discard Unity's built-in networking for this and ins$$anonymous$$d use .Net sockets so it's easier to connect to external programs (Unity's built-in networking can only connect to other Unity instances)
Your answer
![](https://koobas.hobune.stream/wayback/20220613081843im_/https://answers.unity.com/themes/thub/images/avi.jpg)