mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
better comments
This commit is contained in:
parent
7071a6afc8
commit
e951abeb34
@ -1231,14 +1231,13 @@ static void DestroyObject(NetworkIdentity identity, bool destroyServerObject)
|
||||
|
||||
identity.OnStopServer();
|
||||
|
||||
// when unspawning, don't destroy the server's object
|
||||
// only .Destroy() if we are supposed to destroy it on server
|
||||
if (destroyServerObject)
|
||||
{
|
||||
identity.destroyCalled = true;
|
||||
UnityEngine.Object.Destroy(identity.gameObject);
|
||||
}
|
||||
// if we are destroying the server object we don't need to reset the identity
|
||||
// reseting it will cause isClient/isServer to be false in the OnDestroy call
|
||||
// otherwise simply .Reset() it.
|
||||
else
|
||||
{
|
||||
identity.Reset();
|
||||
|
Loading…
Reference in New Issue
Block a user