mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
SpawnObserversForConnection: warning instead of NullReferenceException in case of null entries
This commit is contained in:
parent
e395f29999
commit
50b9517c0f
@ -1051,6 +1051,15 @@ static void SpawnObserversForConnection(NetworkConnectionToClient conn)
|
||||
// internally sends a spawn message for each one to the connection.
|
||||
foreach (NetworkIdentity identity in spawned.Values)
|
||||
{
|
||||
// show a warning in case of unexpected null entries.
|
||||
// keep spawning the other entries though.
|
||||
// https://github.com/MirrorNetworking/Mirror/issues/3330
|
||||
if (identity == null)
|
||||
{
|
||||
Debug.LogWarning("SpawnObserversForConnection: skipping null entry in spawned. This should not happen.");
|
||||
continue;
|
||||
}
|
||||
|
||||
// try with far away ones in ummorpg!
|
||||
if (identity.gameObject.activeSelf) //TODO this is different
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user