public static void AllProto2CS() { // InnerMessage.proto生成cs代码 InnerProto2CS.Proto2CS(); msgOpcode.Clear(); Proto2CS("ETModel", "OuterMessage.proto", clientMessagePath, "OuterOpcode", 100); // msgOpcode.Clear(); // Proto2CS("ETModel", "FrameMessage.proto", "Assets/Scripts/Module/FrameSync/", "FrameOpcode", 10); msgOpcode.Clear(); Proto2CS("ETModel", "HotfixMessage.proto", hotfixMessagePath, "HotfixOpcode", 10000); msgOpcode.Clear(); Proto2CS("ETHotfix", "HotfixMessage.proto", hotfixMessagePath, "HotfixOpcodeServer", 10000); msgOpcode.Clear(); Proto2CS("ETModel", "FrameMessage.proto", hotfixMessagePath, "FrameOpcode", 20000); #if !UNITY_EDITOR_OSX CommandRun($"protoc.bat", ""); #else "bash ./protoc.sh".Bash(System.Environment.CurrentDirectory); #endif AssetDatabase.Refresh(); }
public static void AllProto2CS() { // InnerMessage.proto生成cs代码 InnerProto2CS.Proto2CS(); //msgOpcode.Clear(); //Proto2CS("ETModel", "OuterMessage.proto", clientMessagePath, "OuterOpcode", 100); //msgOpcode.Clear(); //Proto2CS("ETModel", "FrameMessage.proto", "Assets/Model/Module/FrameSync/", "FrameOpcode", 10); msgOpcode.Clear(); Proto2CS("ETHotfix", "CommonModelMessage.proto", hotfixMessagePath, "CommonModelOpcode", 10000); msgOpcode.Clear(); Proto2CS("ETHotfix", "GatherOuterMessage.proto", hotfixMessagePath, "GatherOuterOpcode", 11000); //100开头被OuterMessage占有了 不要用 for (int i = 0; i < messageProtoList.Count; i++) { msgOpcode.Clear(); Proto2CS("ETHotfix", messageProtoList[i] + ".proto", hotfixMessagePath, messageProtoList[i].Replace("Message", "Opcode"), i * 1000 + 17000); } #if !UNITY_EDITOR_OSX CommandRun($"protoc.bat", ""); #else "bash ./protoc.sh".Bash(System.Environment.CurrentDirectory); #endif AssetDatabase.Refresh(); }
public static void AllProto2CS() { // InnerMessage.proto生成cs代码 InnerProto2CS.Proto2CS(); msgOpcode.Clear(); Proto2CS("ETModel", "OuterMessage.proto", clientMessagePath, "OuterOpcode", 100); msgOpcode.Clear(); Proto2CS("ETModel", "FrameMessage.proto", "Assets/Scripts/Module/FrameSync/", "FrameOpcode", 10); msgOpcode.Clear(); Proto2CS("ETHotfix", "HotfixMessage.proto", hotfixMessagePath, "HotfixOpcode", 10000); CommandRun($"protoc.bat", ""); AssetDatabase.Refresh(); }