This commit is contained in:
vis2k 2021-07-31 12:03:27 +08:00
parent 77a3e0f23b
commit 7071a6afc8

View File

@ -129,14 +129,14 @@ static void CleanupNetworkIdentities()
{
if (identity != null)
{
// scene objects are reset and disabled.
// spawned scene objects are reset and disabled.
// they always stay in the scene, we don't destroy them.
if (identity.sceneId != 0)
{
identity.Reset();
identity.gameObject.SetActive(false);
}
// spawned objects are destroyed
// spawned prefabs are destroyed
else
{
GameObject.Destroy(identity.gameObject);