Talking to Unreal Engine from other applications

I want to send commands to Unreal engine from another application running on same PC. This communication will be two way: the actor location and orientation info is sent to the application and the application sends back the movement commands for actor. For various reasons, the application must run as in its own process.

What is the best way to do this? I’m thinking using TCP sockets and I looked at FTcpListener class and some sketchy example that doesn’t work. My other thought is to use Asio library. Ideally, I would like bit higher level interface then raw sockets and simple library. Is there any example to do this?

My other question is what is the good design pattern for Unreal? Is there anyway to define new input type so that I can accept player input from sockets?


You might consider the LowEntry Sockets blueprint plugin that is on the Marketplace. At the very least, it may give you ideas on how to write your own sockets.

I have managed to communicate with UE4 via UDP, over the network and from an application not in anyway linked to UE4.
To do this, I wrote a simple program lives on the client, which “Form1_KeyDown” event every time I press a key. I then send the key via UDP to another application, which lives on the server. This other application then takes the received input command and triggers a custom event which then calls the SendKeys.SendWait() function and sends the received input the the UE4 supplication, which also lives on the server. The trouble that I am having is that the input does not reach the UE4 application smoothly… I have to tap fast on the client and movement is still slow, but it does work.