public override void OnJoinedRoom() { if (PhotonNetwork.CurrentRoom.PlayerCount != 2) { return; } _lobbyCanvas.JoinedRoom(); Player[] playerList = PhotonNetwork.PlayerList; for (int i = 0; i < playerList.Length; i++) { if (playerList[i] != PhotonNetwork.LocalPlayer) { opponent = playerList[i]; break; } } GameStarts(); }