Convenience ActorComponent UDP wrapper for Unreal Engine 4.
This may not be the most sensible wrapper for your use case, but is meant to co-exist with https://github.com/getnamo/socketio-client-ue4 with similar workflow.
Wraps built-in ue4 udp functionality as an actor component with both sending and receiving capabilities. Confirmed working with node.js dgram (see example echo server gist for testing).
- Download Latest Release
- Create new or choose project.
- Browse to your project folder (typically found at Documents/Unreal Project/{Your Project Root})
- Copy Plugins folder into your Project root.
- Plugin should be now ready to use.
Select an actor of choice. Add UDP component to that actor.
Select the newly created component and modify any default settings
e.g. if you're only interested in sending, untick should auto-listen and modify your send ip/port to match your desired settings. Conversely you can untick auto-connect if you're not interested in sending.
Also if you want to connect/listen on your own time untick both and connect manually via e.g. key event
Once you've auto-connected or manually connected to the sending socket, use emit to send some data, utf8 conversion provided by socket.io plugin.
Once you've started listening to data you'll receive data on the OnReceivedBytes
event
which you can convert to convenient strings or structures via socket.io (optional).
Each relase includes the socket.io client plugin, that plugin is intended to be used for reliable control and then real-time/freshest data component of your network can be piped using this udp plugin. Consider timestamping your data so you can know which packets to drop/ignore.
MIT licensed.
Largely inspired from https://wiki.unrealengine.com/UDP_Socket_Sender_Receiver_From_One_UE4_Instance_To_Another.