How to use Raknet Plugin in UE4

Hello, i’m working on a multiplayer project and i wanted to implement Raknet features (especially Nat punchthrough) in my project.

I have found this plugin on git hub : GitHub - yujen/RN4UE4: RakNet plugin for Unreal Engine 4.

I have installed it but i don’t know how to use it? I thought that plugins were blueprint callable but I didn’t find how to activate Nat punchthrough in Blueprints.

Does someone know more about this plugin?

Hi tueurdudimanche:

I have create a sample project, but only Ping server/client in the project currently.
https://forums.unrealengine.com/showthread.php?108857-RakNet-for-UE4

You can find usage in Ping.h/Ping.cpp

If I have free time, I will port RakNet’s NAT punchthrough sample :smiley:

Hello Yujen! Thank you for your answer, did you port NAT punchthrough sample? I don’t know how to port it into UE4 :frowning:

I’ve also have a problem when i try to open your project example. It tells me :

"Running C:/Program Files/Epic Games/4.9/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project=“C:/Users/Nicolas/Desktop/RN4UE4_Sample-master (1)/RN4UE4_Sample-master/RN4UE4_Sample.uproject” -game -rocket -progress
Discovering modules, targets and source code for game…
ERROR: Couldn’t find module rules file for module ‘RakNet’.
"

I’ve also have a problem when i try to open your project example.

Hi nico77950,

The RN4UE4_Sample doesn’t contain RakNet plugin,
you can pull the source code from https://github.com/yujen/RN4UE4 to project Plugin folder.

In your case is “C:/Users/Nicolas/Desktop/RN4UE4_Sample-master/Plugin/”

did you port NAT punchthrough sample?

Currently I don’t port NAT punchthrough yet. Perhaps you want to try yourself.
You can find the sample from official repo NATCompleteClient and NATCompleteServer

May this post can help you.