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
4545 public bool IsClientConnected ;
4646 public Action OnClientConnectedCallback = null ;
4747 public Action OnClientDisconnectCallback = null ;
48+ public Action OnServerStarted = null ;
4849
4950 public NetworkingConfiguration NetworkConfig ;
5051
@@ -202,6 +203,9 @@ public void StartServer(NetworkingConfiguration netConfig)
202203 isServer = true ;
203204 isClient = false ;
204205 isListening = true ;
206+
207+ if ( OnServerStarted != null )
208+ OnServerStarted . Invoke ( ) ;
205209 }
206210
207211 public void StartClient ( NetworkingConfiguration netConfig )
@@ -271,6 +275,9 @@ public void StartHost(NetworkingConfiguration netConfig)
271275 {
272276 SpawnManager . SpawnPlayerObject ( - 1 , 0 ) ;
273277 }
278+
279+ if ( OnServerStarted != null )
280+ OnServerStarted . Invoke ( ) ;
274281 }
275282
276283 private void OnEnable ( )
You can’t perform that action at this time.
0 commit comments