NetworkManager: improve warning about player prefab in spawnable prefabs list

This commit is contained in:
mischa 2023-08-11 22:16:13 +04:00
parent 684a61c964
commit 2a29f6e686

View File

@ -179,7 +179,7 @@ public virtual void OnValidate()
// This avoids the mysterious "Replacing existing prefab with assetId ... Old prefab 'Player', New prefab 'Player'" warning.
if (playerPrefab != null && spawnPrefabs.Contains(playerPrefab))
{
Debug.LogWarning("NetworkManager - Player Prefab should not be added to Registered Spawnable Prefabs list...removed it.");
Debug.LogWarning("NetworkManager - Player Prefab doesn't need to be in Spawnable Prefabs list too. Removing it.");
spawnPrefabs.Remove(playerPrefab);
}
}