SLikeNet (fork of RakNet) plugin for Unreal Engine 5. Tested on 5.8.0, Windows and Linux.
Drop this plugin to the engine plugins folder. Add SLikeNet_UE5 to your project public dependencies in Build.cs. You may also use it as a project plugin but I haven't tested it this way.
For a Linux build you might want to add this code to YourProject.cpp (located in Source/YourProject/, outside of Public/Private folders), otherwise you won't be able to package. At least that was my case.
#include "slikenet/types.h"
// your IMPLEMENT_PRIMARY_GAME_MODULE(...);
#if WITH_EDITOR
#ifndef SWIG
namespace SLNet {
const SystemAddress UNASSIGNED_SYSTEM_ADDRESS;
const RakNetGUID UNASSIGNED_RAKNET_GUID((uint64_t)-1);
}
#endif
#endif
OpenSSL is broken in some Unreal versions (might require source code access to fix).