Abdul Haseeb
Abdul Haseeb

Reputation: 13

How can I send an integer array in Photonview.RPC call

I am trying to send an array of integers across the network to a photonplayer and I cant figure out how can i send an array. this is my method and it doesn't work.

photonView.RPC("RPC_Method", player, array)

and how do i receive it?

RPC_Method(int[] array)

do i need to convert it to a string or something?

Upvotes: 0

Views: 1456

Answers (1)

Hamid Yusifli
Hamid Yusifli

Reputation: 10137

Try casting your array to object:

photonView.RPC("RPC_Method", player, (object)array);

Upvotes: 1

Related Questions