@@ -93,6 +93,7 @@ private ConnectionConfig Init(NetworkingConfiguration netConfig)
93
93
//MLAPI channels and messageTypes
94
94
NetworkConfig . Channels . Add ( "MLAPI_RELIABLE_FRAGMENTED_SEQUENCED" , QosType . ReliableFragmentedSequenced ) ;
95
95
NetworkConfig . Channels . Add ( "MLAPI_POSITION_UPDATE" , QosType . StateUpdate ) ;
96
+ NetworkConfig . Channels . Add ( "MLAPI_ANIMATION_UPDATE" , QosType . ReliableSequenced ) ;
96
97
MessageManager . messageTypes . Add ( "MLAPI_CONNECTION_REQUEST" , 0 ) ;
97
98
MessageManager . messageTypes . Add ( "MLAPI_CONNECTION_APPROVED" , 1 ) ;
98
99
MessageManager . messageTypes . Add ( "MLAPI_ADD_OBJECT" , 2 ) ;
@@ -104,14 +105,21 @@ private ConnectionConfig Init(NetworkingConfiguration netConfig)
104
105
MessageManager . messageTypes . Add ( "MLAPI_CHANGE_OWNER" , 8 ) ;
105
106
NetworkConfig . MessageTypes . Add ( "MLAPI_OnRecieveTransformFromClient" ) ;
106
107
NetworkConfig . MessageTypes . Add ( "MLAPI_OnRecieveTransformFromServer" ) ;
108
+ NetworkConfig . MessageTypes . Add ( "MLAPI_HandleAnimationMessage" ) ;
109
+ NetworkConfig . MessageTypes . Add ( "MLAPI_HandleAnimationParameterMessage" ) ;
110
+ NetworkConfig . MessageTypes . Add ( "MLAPI_HandleAnimationTriggerMessage" ) ;
107
111
108
- for ( int i = 0 ; i < NetworkConfig . RegisteredScenes . Count ; i ++ )
112
+ if ( NetworkConfig . EnableSceneSwitching )
109
113
{
110
- NetworkSceneManager . registeredSceneNames . Add ( NetworkConfig . RegisteredScenes [ i ] ) ;
111
- NetworkSceneManager . sceneIndexToString . Add ( ( uint ) i , NetworkConfig . RegisteredScenes [ i ] ) ;
112
- NetworkSceneManager . sceneNameToIndex . Add ( NetworkConfig . RegisteredScenes [ i ] , ( uint ) i ) ;
114
+ for ( int i = 0 ; i < NetworkConfig . RegisteredScenes . Count ; i ++ )
115
+ {
116
+ NetworkSceneManager . registeredSceneNames . Add ( NetworkConfig . RegisteredScenes [ i ] ) ;
117
+ NetworkSceneManager . sceneIndexToString . Add ( ( uint ) i , NetworkConfig . RegisteredScenes [ i ] ) ;
118
+ NetworkSceneManager . sceneNameToIndex . Add ( NetworkConfig . RegisteredScenes [ i ] , ( uint ) i ) ;
119
+ }
120
+
121
+ NetworkSceneManager . SetCurrentSceneIndex ( ) ;
113
122
}
114
- NetworkSceneManager . SetCurrentSceneIndex ( ) ;
115
123
116
124
117
125
HashSet < string > channelNames = new HashSet < string > ( ) ;
@@ -859,7 +867,7 @@ internal void Send(string messageType, string channelName, byte[] data, uint? ne
859
867
}
860
868
}
861
869
862
- internal void Send ( string messageType , string channelName , byte [ ] data , int clientIdToIgnore , uint ? networkId = null )
870
+ internal void Send ( string messageType , string channelName , byte [ ] data , int clientIdToIgnore , uint ? networkId = null , bool ignoreHost = false )
863
871
{
864
872
//2 bytes for messageType, 2 bytes for buffer length and one byte for target bool
865
873
int sizeOfStream = 5 ;
@@ -885,7 +893,7 @@ internal void Send(string messageType, string channelName, byte[] data, int clie
885
893
if ( pair . Key == clientIdToIgnore )
886
894
continue ;
887
895
int clientId = pair . Key ;
888
- if ( isHost && pair . Key == - 1 )
896
+ if ( isHost && pair . Key == - 1 && ! ignoreHost )
889
897
{
890
898
if ( networkId == null )
891
899
MessageManager . InvokeMessageHandlers ( messageType , data , clientId ) ;
0 commit comments