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
32
32
public bool EncryptMessages = false ;
33
33
public bool AllowPassthroughMessages = true ;
34
34
public bool EnableSceneSwitching = false ;
35
+ public bool UseLegacyChannel = false ;
35
36
36
37
//Cached config hash
37
38
private byte [ ] ConfigHash = null ;
Original file line number Diff line number Diff line change @@ -106,7 +106,13 @@ private ConnectionConfig Init(NetworkingConfiguration netConfig)
106
106
ConnectionConfig cConfig = new ConnectionConfig ( ) ;
107
107
108
108
//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
+
110
116
NetworkConfig . Channels . Add ( "MLAPI_POSITION_UPDATE" , QosType . StateUpdate ) ;
111
117
NetworkConfig . Channels . Add ( "MLAPI_ANIMATION_UPDATE" , QosType . ReliableSequenced ) ;
112
118
MessageManager . messageTypes . Add ( "MLAPI_CONNECTION_REQUEST" , 0 ) ;
You can’t perform that action at this time.
0 commit comments