Protocol
項目使用protobuff作為消息傳輸
一、修改 Protocol 消息內容
Proto目錄 fivestar-master\Proto
//请求公告
message C2L_GetAnnouncement // IUserRequest
{
int32 RpcId = 90;
int64 UserId = 91;
}
message L2C_GetAnnouncement // IResponse
{
int32 RpcId = 90;
int32 Error = 91;
string Message = 92;
}如上所寫案例,C2L 為 Client 發送到 Lobby Server,Request跟Response需要在消息後面備註不同類型 interface
二、更新 Protocol
切換回 Unity,點選 Tools\Proto2CS ,完成後會更新 Unity 項目的 Protocol 消息
{Project}\Unity\Assets\Hotfix\Module\Message\
Last updated