Remove ClearLocalObjects functions and use NetworkIdentity.spawned.Clear(); instead

This commit is contained in:
vis2k 2018-12-16 15:39:38 +01:00
parent d979a45870
commit 10229f3b96
2 changed files with 2 additions and 12 deletions

View File

@ -14,7 +14,7 @@ internal class NetworkScene
internal void Shutdown()
{
ClearLocalObjects();
NetworkIdentity.spawned.Clear();
ClearSpawners();
}
@ -66,11 +66,6 @@ internal bool RemoveLocalObject(uint netId)
return NetworkIdentity.spawned.Remove(netId);
}
internal void ClearLocalObjects()
{
NetworkIdentity.spawned.Clear();
}
internal static void RegisterPrefab(GameObject prefab, Guid newAssetId)
{
NetworkIdentity view = prefab.GetComponent<NetworkIdentity>();
@ -229,7 +224,7 @@ internal void DestroyAllClientObjects()
}
}
}
ClearLocalObjects();
NetworkIdentity.spawned.Clear();
}
}
}

View File

@ -1069,11 +1069,6 @@ static void DestroyObject(NetworkIdentity uv, bool destroyServerObject)
uv.MarkForReset();
}
public static void ClearLocalObjects()
{
NetworkIdentity.spawned.Clear();
}
public static void Spawn(GameObject obj)
{
if (VerifyCanSpawn(obj))