How do I transfer information around players

I am making a multiplayer game with a randomly generated map. I need to transfer the seed from the original player to the other players. To do that I'm using the following code:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Photon.Pun;


public class Character_Spawner_MultiPlayer : MonoBehaviour
{


    public GameObject generationGrid;
    void Start()
    {


        if (PhotonNetwork.CountOfPlayers == 1)
        {
            PhotonNetwork.Instantiate("Character (1) Variant", new Vector3(), Quaternion.identity);
            generationGrid.SetActive(true);
            var a = new ExitGames.Client.Photon.Hashtable(); ;
            a.Add("seed",generationGrid.GetComponent<Level_Genration>().seed);
            PhotonNetwork.CurrentRoom.SetCustomProperties(a);
        }
        else
        {
            PhotonNetwork.Instantiate("Character (1) Variant", new Vector3(), Quaternion.identity);
            SeedReader.ReadSeed((string)PhotonNetwork.CurrentRoom.CustomProperties["seed"]);
        }






    }






}

The problem I have is that Visual Studio says that there is no "Room" type or namespace. But the problem doesn't appear in Unity. So the question is: Is it really a problem an if it is how do I fix it?

Answers

  • Edit: It happens when I run the script in Unity too.