Skip to content

Integrate lua-protobuf into unlua

Notifications You must be signed in to change notification settings

brinkqiang2lua/unlua-pb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

What is this?

这是集成lua-ptorobuf到Unlua的Module。基于392ace3

Usage

  1. 把本仓库clone之后放到Unlua的ThirdParty下;
  2. UnLua.uplugin中的Modules下添加如下内容:
{
  "Name": "LuaProtobuf",
  "Type": "Runtime",
  "LoadingPhase": "Default"
}
  1. 在Unlua的build.cs中添加LuaProtobuf模块依赖;
  2. UnluaLuaContext.cpp中的FLuaContext::CreateState函数中调用FLuaProtobuf::RegisterLuaLib即可。
FLuaProtobuf& LuaProtobuf = FModuleManager::LoadModuleChecked<FLuaProtobuf>(TEXT("LuaProtobuf"));
LuaProtobuf.RegisterLuaLib(L);

注意:模块注册时已经把protoc.luaserpent.lua都添加了,不需要再把他们放到Content/Script下。

About

Integrate lua-protobuf into unlua

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 88.1%
  • Lua 11.2%
  • Other 0.7%