RPC request issue

Hi,
I've got this :


called in the same class there:


and it return me that error:

Comments

  • So i don't know why, but it looks like my byte[][] is considered as a byte[].
    Someone has a solution?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @SirKrow,

    I think PUN does not support serialization of jagged or two-dimensional arrays.

    I recommend you serialize all the data to a regular one-dimensional byte array.

    In all cases, if you want to use an array as an RPC parameter, cast it as an object first:
    byte[] data = SerializeData();
    photonView.RPC("SendMaterialData", RpcTarget.OthersBuffered, (object)data);
  • SirKrow
    SirKrow
    edited September 2019
    I already used a bidimensional array in a RPC and it worked very well, but i'll to replace this