mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Add channelId to Send Method (#862)
This is to achieve parity with NetworkConnection: ```cs public virtual bool Send<T>(T msg, int channelId = Channels.DefaultReliable) where T: IMessageBase { // pack message and send byte[] message = MessagePacker.Pack(msg); return SendBytes(message, channelId); } ```
This commit is contained in:
parent
68e14dd828
commit
e9f2f538ca
@ -195,7 +195,7 @@ public static bool Send(short msgType, MessageBase msg)
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool Send<T>(T message) where T : IMessageBase
|
||||
public static bool Send<T>(T message, int channelId = Channels.DefaultReliable) where T : IMessageBase
|
||||
{
|
||||
if (connection != null)
|
||||
{
|
||||
@ -204,7 +204,7 @@ public static bool Send<T>(T message) where T : IMessageBase
|
||||
Debug.LogError("NetworkClient Send when not connected to a server");
|
||||
return false;
|
||||
}
|
||||
return connection.Send(message);
|
||||
return connection.Send(message, channelId);
|
||||
}
|
||||
Debug.LogError("NetworkClient Send with no connection");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user