- Windows 10 + UE5.2.1
For now, the scripts (build.cmd & protoc.cmd) only support windows system
This plugin is created for easily integrating gRPC
framework in the UE5 project.
- To install
Visual Stuidio
,Git
andCMake
, please refer to this site.
- Create the UE5 project as you planned.
- Download the zip file using the
- Go to the Windows system deskop and use keyshort
command + R
to open theRun
windows. Inside the blank input bar in theRun
window, type incmd
and clikcEnter
key to launch the command line. - Use
cd
command to get into the directory where your project locates. Then use commandcd Plugins
to get into the Plugins directory. - Use command
git clone [email protected]:AeroSight/UE5_gRPCLoader.git
to download the plugin.
- Still in the command line, use command
cd UE5_gRPCLoader
to get into the plugin directory. - Type command
build.cmd
to execute the build script, then all you have to do is just wait for half an hour. - After the script finishes, you should be able to see the grpc library inside the directory
Binaries/ThirdParty
.
- Still in the command line, use command
protoc.cmd
to get the generated protobuf cpp files according to the predifined protobuf files. - Now you can see the generated protobuf files inside the directory
Source\UE5_gRPCLoader\Public\protos
. - Add these mcaros inside the file
Binaries\ThirdParty\grpc\Win64\include\google\protobuf\port_undef.inc
to avoid macro confilicts between gRPC and UE5.#pragma warning(disable:4800) #pragma warning(disable:4067) #pragma warning(disable:4668) #undef verify(expr)
Now, you should be able to rebuild the whole UE5 project and the gRPC server will listen the port 30031
. You can modify the server settings in the file Source\UE5_gRPCLoader\Private\FGRPCServerThread.cpp
.
You can include the header files provided by the plugin in the UE5 main game classes (Actor, GameMode...) using `#include UE5_gRPCLoader/Public/XXX.h"