@@ -174,7 +174,8 @@ internal void InvokeOnIncomingCustomMessage(uint clientId, Stream stream)
174
174
/// <param name="clientIds">The clients to send to, sends to everyone if null</param>
175
175
/// <param name="stream">The message stream containing the data</param>
176
176
/// <param name="channel">The channel to send the data on</param>
177
- public void SendCustomMessage ( List < uint > clientIds , BitStream stream , string channel = "MLAPI_DEFAULT_MESSAGE" )
177
+ /// <param name="security">The security settings to apply to the message</param>
178
+ public void SendCustomMessage ( List < uint > clientIds , BitStream stream , string channel = null , SecuritySendFlags security = SecuritySendFlags . None )
178
179
{
179
180
if ( ! IsServer )
180
181
{
@@ -185,14 +186,14 @@ public void SendCustomMessage(List<uint> clientIds, BitStream stream, string cha
185
186
{
186
187
for ( int i = 0 ; i < ConnectedClientsList . Count ; i ++ )
187
188
{
188
- InternalMessageHandler . Send ( ConnectedClientsList [ i ] . ClientId , MLAPIConstants . MLAPI_CUSTOM_MESSAGE , channel , stream , SecuritySendFlags . None ) ;
189
+ InternalMessageHandler . Send ( ConnectedClientsList [ i ] . ClientId , MLAPIConstants . MLAPI_CUSTOM_MESSAGE , string . IsNullOrEmpty ( channel ) ? "MLAPI_DEFAULT_MESSAGE" : channel , stream , security ) ;
189
190
}
190
191
}
191
192
else
192
193
{
193
194
for ( int i = 0 ; i < clientIds . Count ; i ++ )
194
195
{
195
- InternalMessageHandler . Send ( clientIds [ i ] , MLAPIConstants . MLAPI_CUSTOM_MESSAGE , channel , stream , SecuritySendFlags . None ) ;
196
+ InternalMessageHandler . Send ( clientIds [ i ] , MLAPIConstants . MLAPI_CUSTOM_MESSAGE , string . IsNullOrEmpty ( channel ) ? "MLAPI_DEFAULT_MESSAGE" : channel , stream , security ) ;
196
197
}
197
198
}
198
199
}
@@ -203,9 +204,10 @@ public void SendCustomMessage(List<uint> clientIds, BitStream stream, string cha
203
204
/// <param name="clientId">The client to send the message to</param>
204
205
/// <param name="stream">The message stream containing the data</param>
205
206
/// <param name="channel">The channel tos end the data on</param>
206
- public void SendCustomMessage ( uint clientId , BitStream stream , string channel = "MLAPI_DEFAULT_MESSAGE" )
207
+ /// <param name="security">The security settings to apply to the message</param>
208
+ public void SendCustomMessage ( uint clientId , BitStream stream , string channel = null , SecuritySendFlags security = SecuritySendFlags . None )
207
209
{
208
- InternalMessageHandler . Send ( clientId , MLAPIConstants . MLAPI_CUSTOM_MESSAGE , channel , stream , SecuritySendFlags . None ) ;
210
+ InternalMessageHandler . Send ( clientId , MLAPIConstants . MLAPI_CUSTOM_MESSAGE , string . IsNullOrEmpty ( channel ) ? "MLAPI_DEFAULT_MESSAGE" : channel , stream , security ) ;
209
211
}
210
212
211
213
private void OnValidate ( )
0 commit comments