Exit.Games.Client.Photon.Hashtable type not found

Options

I am using PUN 2 to implement multiplayer to my "Rogue-like" game.

Currently I am stuck with transferring the map information from the first player to the rest of them. To do that I'm using the following code:

     var a = new ExitGames.Client.Photon.Hashtable();


     a.Add("map", structure);
     PhotonNetwork.CurrentRoom.SetCustomProperties(a);
     GetComponent<SaveSeed>().enabled = false;
          

Firstly I want to say that I'm using VS 2022 and it has been acting up, not being able to find classes and types that are clearly there and as so giving several errors even though the code works fine in Unity itself(talking about other scripts not the one I'm showing)

When I run this script all goes well until it has to make the Exit.Games.Client.Photon.Hashtable variable. It then throws the following error:

Custom type not found: UnityEngine.GameObject Exception: Write failed. Custom type not found: UnityEngine.GameObject ExitGames.Client.Photon.Protocol18.WriteCustomType (ExitGames.Client.Photon.StreamBuffer stream, System.Object value, System.Boolean writeType)

Any advice?

Answers

  • blago
    Options

    OK turns out it is a size limitation problem because I was trying to upload a whole GameObject.