<commit_before>﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class NetworkManager : MonoBehaviour
{

    [SerializeField] Text connectionText;
    [SerializeField] Transform[] spawnPoints;
    [SerializeField] Camera sceneCamera;

    GameObject player;

    private int pIndex;
    private bool spawned = false;

    void Start()
    {
        PhotonNetwork.logLevel = PhotonLogLevel.Full;
        PhotonNetwork.ConnectUsingSettings("0.1");
        pIndex = PhotonNetwork.playerList.Length;
    }

    void Update()
    {
 //       connectionText.text = PhotonNetwork.connectionStateDetailed.ToString() + " " + PhotonNetwork.playerList.Length + " " + pIndex;
        if (!spawned)
        {
            if (PhotonNetwork.playerList.Length == 2)
            {
                SpawnPlayer();
                spawned = true;
            }
        }
    }


    void OnJoinedRoom()
    {
        sceneCamera.enabled = true;
        if (PhotonNetwork.playerList.Length == 2)
        {
            SpawnPlayer();
        }
    }

    void SpawnPlayer()
    {

        player = PhotonNetwork.Instantiate("Player_1_Obj",
            spawnPoints[pIndex-1].position,<commit_msg>spawn both prefabs....<commit_after>﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class NetworkManager : MonoBehaviour
{

    [SerializeField] Text connectionText;
    [SerializeField] Transform[] spawnPoints;
    [SerializeField] Camera sceneCamera;

    GameObject player;

    private int pIndex;
    private bool spawned = false;

    void Start()
    {
        PhotonNetwork.logLevel = PhotonLogLevel.Full;
        PhotonNetwork.ConnectUsingSettings("0.1");
        pIndex = PhotonNetwork.playerList.Length;
    }

    void Update()
    {
 //       connectionText.text = PhotonNetwork.connectionStateDetailed.ToString() + " " + PhotonNetwork.playerList.Length + " " + pIndex;
        if (!spawned)
        {
            if (PhotonNetwork.playerList.Length == 2)
            {
                SpawnPlayer();
                spawned = true;
            }
        }
    }


    void OnJoinedRoom()
    {
        sceneCamera.enabled = true;
        if (PhotonNetwork.playerList.Length == 2)
        {
            SpawnPlayer();
        }
    }

    void SpawnPlayer()
    {

        player = PhotonNetwork.Instantiate("Player_"+ pIndex +"_Obj",
            spawnPoints[pIndex-1].position,
{'fraction_non_alphanumeric': 0.10090984284532671, 'fraction_numerical': 0.004549214226633582, 'mean_word_length': 2.129366106080207, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4815596', 'n_tokens_mistral': 702, 'n_tokens_neox': 689, 'n_words': 127}