I am making a freeze tag game mode for my game, and I found a problem. The problem is when the script finds all the game objects with a particular tag. It adds how many things with the tag to the list, but it doesn’t add all the game objects. Just the number of game objects there are. (It added three elements to the list but with no game objects in them)
My Script:
private void Awake()
{
GameObject[] gameObjects = GameObject.FindGameObjectsWithTag("Player");
playersInRoom = new GameObject[gameObjects.Length];
}