How to identify players on Photon Unity?


Im trying to make a multiplayer racing game using Photon Unity, but Im not sure how to assign unique IDs to the players.
What I’m trying to do is once the players create/join their room, they don’t all spawn at the same spawn point, but rather, one person spawns per spawn point.

For example heres the code for the NetworkManager currently

using UnityEngine;
using System.Collections;

public class NetworkManager : MonoBehaviour {

	private const string Version = "v1.0";
	public string roomname = "MultiplayerRoom";
	public string playerPrefabName = "MultiplayerCar01";
	public Transform spawnpoint_1;
	public Transform spawnpoint_2;
	public Transform spawnpoint_3;
	public Transform spawnpoint_4;
	public Transform spawnpoint_5;
	public Transform spawnpoint_6;
	public Transform spawnpoint_7;
	public Transform spawnpoint_8;

	void OnJoinedRoom ()
		if ( == 8)
		StartGame ();

	void StartGame ()

	void Start () {

	void OnJoinedLobby () {
		RoomOptions roomOptions = new RoomOptions() { isVisible = true, maxPlayers = 8 };
		PhotonNetwork.JoinOrCreateRoom(roomname, roomOptions, TypedLobby.Default);


As you can see I have 8 spawn points but my question is how do I differentiate the players so that Player 1 goes to spawn point 1, Player 2 to spawn point 2 etc.


First of all take the spawnpoints as an array of maximum 8.
Get the numbers of players connected using the PhotonNetwork.playerList.
Run a for loop and set the players to their positions.

spawnpoint[PhotonNetwork.player.ID] as position to instantiate your prefab so spawnpoint should be a vector3 array. Its one line of code. As rotation you could use identity or just make another quaternion array with spawnrotation.
That is literally one line of code. excludining defining the arrays.