mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
* fix: calling unspawn on scene objects in DestroyOwnedObjects fixes: https://github.com/MirrorNetworking/Mirror/issues/3538 * Update NetworkConnectionToClient.cs --------- Co-authored-by: mischa <16416509+vis2k@users.noreply.github.com>
This commit is contained in:
parent
51c7162af7
commit
08fa0269de
@ -248,7 +248,12 @@ internal void DestroyOwnedObjects()
|
||||
{
|
||||
if (netIdentity != null)
|
||||
{
|
||||
NetworkServer.Destroy(netIdentity.gameObject);
|
||||
// unspawn scene objects, destroy instantiated objects.
|
||||
// fixes: https://github.com/MirrorNetworking/Mirror/issues/3538
|
||||
if (netIdentity.sceneId != 0)
|
||||
NetworkServer.UnSpawn(netIdentity.gameObject);
|
||||
else
|
||||
NetworkServer.Destroy(netIdentity.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user