Send an array of int[] via RPC
The whole answer can be found below.
Try Our
Documentation
Please check if you can find an answer in our extensive documentation on PUN.
Join Us
on Discord
Meet and talk to our staff and the entire Photon-Community via Discord.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Send an array of int[] via RPC
HooDoo
2016-04-30 01:32:31
I need to send an array of ints via RPC
I tried the following, and it does not give an error, but the values do not get sent over properly:
int[] myints=new int[2];
myints[0]=0;
myints[1]=1;
photonView.RPC("sendints",PhotonTargets.Others,(int[])myints);
...
[PunRPC]
void sendints(int[] myints) {
myints[0]....says 0
myints[1]....says 0
anyone know how to do this?
I need to send array of vectors, floats and ints
Comments
int[] will work same way as float[]: http://forum.photonengine.com/discussion/comment/28055/#Comment_28055
Thanks for the reply!
Back to top