【Unity】Protobuf的使用与常见问题

Protobuf的使用流程

参考教程:https://www.jianshu.com/p/b135676dbe8d

手写.proto文件后,用CMD命令行运行protoc.exe编译器,进入.proto文件路径生成C#文件,再把C#文件放到Unity项目中使用。


 Missing input file

命令行使用protoc.exe时,报错Missing input file。即当前设置的--proto_path目录下找不到.proto文件。如下图,protoc.exe与person.proto文件在同一目录下的。

 

原因是格式错误,文件路径=./后面要加上一个空格!!!!!!!!!

猜你喜欢

转载自www.cnblogs.com/guxin/p/9091392.html