mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
parent
3e3a1cbb44
commit
461ce27908
@ -674,8 +674,8 @@ internal void OnStopServer()
|
||||
bool clientStarted;
|
||||
internal void OnStartClient()
|
||||
{
|
||||
if (clientStarted)
|
||||
return;
|
||||
if (clientStarted) return;
|
||||
|
||||
clientStarted = true;
|
||||
|
||||
// Debug.Log($"OnStartClient {gameObject} netId:{netId}");
|
||||
@ -700,6 +700,10 @@ internal void OnStartClient()
|
||||
|
||||
internal void OnStopClient()
|
||||
{
|
||||
// In case this object was destroyed already don't call
|
||||
// OnStopClient if OnStartClient hasn't been called.
|
||||
if (!clientStarted) return;
|
||||
|
||||
foreach (NetworkBehaviour comp in NetworkBehaviours)
|
||||
{
|
||||
// an exception in OnStopClient should be caught, so that
|
||||
|
Loading…
Reference in New Issue
Block a user