File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
MLAPI/Data/Transports/UNET Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ public class UnetTransport : Transport
17
17
public int ServerListenPort = 7777 ;
18
18
public int ServerWebsocketListenPort = 8887 ;
19
19
public bool SupportWebsocket = false ;
20
+ public List < TransportChannel > Channels = new List < TransportChannel > ( ) ;
21
+
20
22
21
23
// Relay
22
24
public bool UseMLAPIRelay = false ;
@@ -262,6 +264,14 @@ public ConnectionConfig GetConfig()
262
264
channelNameToId . Add ( MLAPI_CHANNELS [ i ] . Name , channelId ) ;
263
265
}
264
266
267
+ for ( int i = 0 ; i < Channels . Count ; i ++ )
268
+ {
269
+ int channelId = AddChannel ( Channels [ i ] . Type , config ) ;
270
+
271
+ channelIdToName . Add ( channelId , Channels [ i ] . Name ) ;
272
+ channelNameToId . Add ( Channels [ i ] . Name , channelId ) ;
273
+ }
274
+
265
275
return config ;
266
276
}
267
277
You can’t perform that action at this time.
0 commit comments