File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ public class NetworkingConfiguration
3232 public bool EncryptMessages = false ;
3333 public bool AllowPassthroughMessages = true ;
3434 public bool EnableSceneSwitching = false ;
35+ public bool UseLegacyChannel = false ;
3536
3637 //Cached config hash
3738 private byte [ ] ConfigHash = null ;
Original file line number Diff line number Diff line change @@ -106,7 +106,13 @@ private ConnectionConfig Init(NetworkingConfiguration netConfig)
106106 ConnectionConfig cConfig = new ConnectionConfig ( ) ;
107107
108108 //MLAPI channels and messageTypes
109- NetworkConfig . Channels . Add ( "MLAPI_RELIABLE_FRAGMENTED_SEQUENCED" , QosType . ReliableFragmentedSequenced ) ;
109+
110+ //Legacy channel. ReliableFragmentedSequenced doesn't exist in older Unity versions.
111+ if ( NetworkConfig . UseLegacyChannel )
112+ NetworkConfig . Channels . Add ( "MLAPI_RELIABLE_FRAGMENTED_SEQUENCED" , QosType . ReliableSequenced ) ;
113+ else
114+ NetworkConfig . Channels . Add ( "MLAPI_RELIABLE_FRAGMENTED_SEQUENCED" , QosType . ReliableFragmentedSequenced ) ;
115+
110116 NetworkConfig . Channels . Add ( "MLAPI_POSITION_UPDATE" , QosType . StateUpdate ) ;
111117 NetworkConfig . Channels . Add ( "MLAPI_ANIMATION_UPDATE" , QosType . ReliableSequenced ) ;
112118 MessageManager . messageTypes . Add ( "MLAPI_CONNECTION_REQUEST" , 0 ) ;
You can’t perform that action at this time.
0 commit comments