Advertisement
Guest User

Untitled

a guest
May 14th, 2017
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1.     void Awake()
  2.     {
  3.         byte[] a = new byte[100];
  4.         photonView.RPC("test",PhotonTargets.AllBuffered,a);
  5.     }
  6.     [PunRPC]
  7.     void test(byte[] a)
  8.     {
  9.         Debug.LogError(a.Length);
  10.     }  
  11.     public void OnPhotonSerializeView(PhotonStream stream, PhotonMessageInfo info)
  12.     {
  13.         if (stream.isWriting)
  14.         {
  15.             byte[] a = new byte[100];
  16.             stream.SendNext(a);
  17.         }
  18.         else
  19.         {
  20.             byte[] a = (byte[])stream.ReceiveNext();
  21.             Debug.LogError(a.Length);
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement