All-in-One Solution for Indie Game Development · Empowering Indie Developers' Dreams
📖 Documentation • 💬 QQ Group: 467608841
🌐 Language: English | 简体中文 | 繁體中文 | 日本語 | 한국어
A tool for converting Proto protocol files into Server/Unity/TypeScript code.
Below is a detailed description of the command-line parameters for this tool.
--mode
This parameter specifies the run mode. Valid values include Server, Unity, or TypeScript.
--inputpath
This parameter specifies the path to the .proto protocol files. The program will scan all files ending with .proto under the specified path.
--outputpath
This parameter specifies the output path for the generated files.
--namespaceName
This parameter specifies the namespace. This parameter has no effect in TypeScript mode. If you do not want to set a namespace, pass an empty value.
The following command example demonstrates how to convert Proto protocol files into Server code:
--mode server --inputpath ./../../../../../Protobuf --outputpath ./../../../../../Server/GameFrameX.Proto/Proto --namespaceName GameFrameX.Proto.Proto
In the above example:
--mode serversets the run mode to Server.--inputpath ./../../../../../Protobufsets the .proto protocol file path to./../../../../../Protobuf.--outputpath ./../../../../../Server/GameFrameX.Proto/Protosets the output file path to./../../../../../Server/GameFrameX.Proto/Proto.--namespaceName GameFrameX.Proto.Protosets the namespace toGameFrameX.Proto.Proto.
You can adjust the command-line parameters to generate the appropriate code for your needs.
