unity 中 protoc-gen-lua 生成 lua 文件

你可能遇到 from google.protobuf import descriptor 这样的错误

1、这个工具依赖 Python 的 protobuf 生成

2、protobuf 的源代码根目录下有 Python 的目录

3、运行前先编译 protoc 在 src 目录下,或者将之前编译好的拷贝过来也可以

4、转到 protobuf/python 目录下,先运行 python setup build 再运行 python setup install

5、这样在再运行 make_proto 就可以了,生成文件在 Lua/protol 下

 

posted @ 2016-07-28 18:33  tomren  阅读(1135)  评论(0编辑  收藏  举报