Unity中使用gRPC

时间20180508,使用的unity版本2017.2,unity中的.net 4.6平台仍是不稳定版本。git

示例代码地址:https://github.com/hiramtan/HigRPC_unitygithub

估计还不会有人用在商业手游项目中,缘由:windows

  • .net 4.6仍是实验性版本,并不能保证稳定性。
  • 编译可用的gRPC类库到移动平台。
  • 须要验证在Android iOS平台上全部逻辑的稳定性。

在编辑器中使用流程以下:编辑器

How to use in unity

  • 设置 .net 4.6 测试

  • 导入 gRPC dll.net

    • Google.Protobuf.dll
    • Grpc.Core.dll
    • grpc_csharp_ext.x64.dll
    • System.Interactive.Async.dll
  • 建立测试逻辑.code

Extention

用户自定义协议及代码生成orm

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 platformblog

点击连接加入QQ群【83596104】:https://jq.qq.com/?_wv=1027&k=5l6rZErrpc

相关文章
相关标签/搜索