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
1717 public int ServerListenPort = 7777 ;
1818 public int ServerWebsocketListenPort = 8887 ;
1919 public bool SupportWebsocket = false ;
20+ public List < TransportChannel > Channels = new List < TransportChannel > ( ) ;
21+
2022
2123 // Relay
2224 public bool UseMLAPIRelay = false ;
@@ -262,6 +264,14 @@ public ConnectionConfig GetConfig()
262264 channelNameToId . Add ( MLAPI_CHANNELS [ i ] . Name , channelId ) ;
263265 }
264266
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+
265275 return config ;
266276 }
267277
You can’t perform that action at this time.
0 commit comments