Spawning Teams Close Together

Ok i want it so that in any search and destroy or team deathmatch games in my fps game make the teams spawn where they should spawn. Say like i choose the a team i spawn in section a. If i choose b team i spawn in section b on the other side of the map. So when the match starts, pclayers dont spawn right on top of each other so they should spawn around each other.

So can someone help me with this please using spawnPoints. I will be very happy if you could help me.

  1. Create a bunch of empty gameobjects in locations (in each respective spawn) that won’t intersect with other players
  2. Put them in an array
  3. Iterate through the array (at random, if you want) and assign each player to spawn at one of the points