Disconnect when trying to send Dictionary<int, int[]>

Options
Hello there. I want to spawn a few items in my game and manage them with one PhotonView. And when another user logs into the game I want to say to him - "hey man, I have alredy created a few items here, here is their IDs".
Since I have a few spawn points which hold different arrays of items to create, I want to send something like this
{id of a spawn point, {id of an item to create, id of an item to create},
id of another spawn point, {id of an item to create}}
This means that I have 3 iteams in the scene, and the first to belong to the first spawn point, and the last one belongs to another spawn point.

So I tried to send Dictionary through the custom properties of a room. And when I do so, a client just disconnects from the photon server. I also tried to send the data through the OnPhotonSerializeView method, but it didn't help.

By the way, when I send Dictionary - everything is okay.

Any ideas what's going on? and how to send the needed data to other players?

Best Answer

Answers