This project is to display how to use google's gRPC with unity.
-
Import gRPC dll to unity project
- Google.Protobuf.dll
- Grpc.Core.dll
- grpc_csharp_ext.x64.dll
- System.Interactive.Async.dll
-
Create logic to test if run correct.
Run untiy and will print "Greeting: Hello you"
Add user's protocol and generate code
Grpc.Tools.1.11.x\tools\windows_x86\protoc.exe -I../../protos --csharp_out Greeter --grpc_out Greeter ../../protos/helloworld.proto --plugin=protoc-gen-grpc=packages/Grpc.Tools.1.11.x/tools/windows_x86/grpc_csharp_plugin.exe
Note: Haven't test on mobile platform
Time:2018.05.08
Google gRPC's source code also alert unity support is experimental and work-in-progress.Don't expact it to work