File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
MLAPI/MonoBehaviours/Core Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ public bool isHost
45
45
public bool IsClientConnected ;
46
46
public Action OnClientConnectedCallback = null ;
47
47
public Action OnClientDisconnectCallback = null ;
48
+ public Action OnServerStarted = null ;
48
49
49
50
public NetworkingConfiguration NetworkConfig ;
50
51
@@ -202,6 +203,9 @@ public void StartServer(NetworkingConfiguration netConfig)
202
203
isServer = true ;
203
204
isClient = false ;
204
205
isListening = true ;
206
+
207
+ if ( OnServerStarted != null )
208
+ OnServerStarted . Invoke ( ) ;
205
209
}
206
210
207
211
public void StartClient ( NetworkingConfiguration netConfig )
@@ -271,6 +275,9 @@ public void StartHost(NetworkingConfiguration netConfig)
271
275
{
272
276
SpawnManager . SpawnPlayerObject ( - 1 , 0 ) ;
273
277
}
278
+
279
+ if ( OnServerStarted != null )
280
+ OnServerStarted . Invoke ( ) ;
274
281
}
275
282
276
283
private void OnEnable ( )
You can’t perform that action at this time.
0 commit comments