Simple Unreal Engine (UE) plugin containing an actor component which creates a UDP receiver socket for inter-communication.
- Event-driven UDP message processing
- Send message functionality for client communication
- Blueprint integration
- Customizable IP, port, and buffer size
Plugin makes use of Networking
and Sockets
UE modules.
- Clone this repository into your
Plugins/
directory:$ git clone https://github.com/wjake/UE-UDPReceiver.git Plugins/UDPReceiver
- Open your Unreal Engine project, and enable the plugin in the Plugins Manager.
- Add the
UUDPReceiver
component to your actor - Configure the properties (IP, Port, etc.)
- Set component
Auto activate
in Details pane, or callStartUDPReceiver
in the Event Graph - Use
OnMessageReceivedEvent
node to handle received messages - Use
SendMessage
node to send message to a client
- Import
socket
library dependency
import socket
- Define socket IP address & port number
server_address = ('127.0.0.1', 65432)
- Create connection to UDP socket
udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- Send data
udp_socket.sendto('data', server_address)
- Receive Message
data, server = udp_socket.recvfrom(1024)
- Close socket connection
udp_socket.close()