Serialization in RPC problem.

Options
My RPC call is looking kind of like this:
object[] objectArrayToSend = GenerateObjectsToSend(); photonView.RPC("MyRPC", PhotonTargets.All, new object[] { objectArrayToSend });

So I'm sending an array of objects. All of the objects are listed as supported types here. At least I think. here's a list of all possible types that can be in the objectArrayToSend array:
int
int[]
bool
Dictionary
Dictionary

The problem:
When the RPC is called (tested using Debug.Log) objectArrayToSend[0] is an integer of value 1.
However, when it runs, I call Debug.Log((int)objectToSend[0]) and it outputs 0.

Comments

  • ThaBullfrog
    Options
    Sorry for the double post. I can't find the edit button.
    The Dictionaries above were supposed to be
    Dictionary<int[], string>
    and
    Dictionary<int[], string[]>
    but they were messed up because of the HTML formatting.