Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

Send an array of int[] via RPC

$
0
0
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


Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>