Unity lua Protobuf 开发
来源:互联网 发布:网络直播发展史 编辑:程序博客网 时间:2024/06/06 11:48
环境:
1. Unity 5.6
3.ProtoBuf 2.6.1 https://github.com/google/protobuf
4.protoc-gen-lua https://github.com/sean-lin/protoc-gen-lua
5.Python 2.7
在各种更新到本地之后开始了以下的操作:
1. 把Protoc放到protobuf/src下,再 cmd进入到protobuf/python 执行以下命令,
python setup.py build
python setup.py install
这里主要是要把protobuf 编译为 Python 库,这样Python 就可以解析了
2:把protobuf-2.6.1\protobuf-2.6.1\python\google\protobuf\compiler 文件夹下的 plugin_pb2.py 拷贝到protoc-gen-lua 下
3. 进入protoc-gen-lua/ 下面 新建一个*.bat 把以下内容填写进去,***为protoc-gen-lua的路径
@python ****\protoc-gen-lua\protoc-gen-lua
这里 为什么 叫 "protoc-gen-lua",可以这样理解:如果还要再加一个Protobuf 插件,你可以这样命名:"protoc-gen-xuke", 那么你的protoc 的执行选项可写成:
"protoc.exe" --plugin=protoc-gen-xuke="..\protoc-gen-xuke\*.bat" --xuke_out= ./
明白了吗?
4:protoc-gen-lua/protobuf中有个pb.c文件,这个是Lua库文件,uLua的做法是直接把这个库集成到了自己的身上,也就是同一个dll身上
- Unity lua Protobuf 开发
- unity-lua开发环境
- 在Unity.ulua环境下如何生成lua的protobuf文件
- Lua protobuf相关API
- lua&protobuf使用
- protobuf lua源码解析
- cocos2dx lua集成protobuf
- protobuf for lua
- protobuf for lua 实现
- cocos2d-lua 集成protobuf
- Protobuf与lua服务端
- lua下使用protobuf
- [Unity 网络]Unity Protobuf使用
- Unity配置Protobuf协议
- Unity配置Protobuf协议
- Unity 使用 Protobuf-net
- Unity使用protobuf
- unity 简单使用protobuf
- java redis 入门
- 文章标题
- 九麟SDK 接入文档
- static_assert和assert的基本区别(可能不全)
- Flask 数据库多对多关系
- Unity lua Protobuf 开发
- 备份数据库时提示“无法打开备份设备”
- python-网络爬虫初学二:headers的设置和一些高级特性
- Git的使用--如何将本地项目上传到Github
- 将一个浮点数分成整数和小数部分,金额转换成大写
- python opencv3 —— findContours
- MongoDB学习
- 医院建设呼叫中心的意义
- 局部异常因子与KL散度异常检测算法简述