Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Raika on January 10, 2018, 08:21:31 AM

Title: Send array with photon?[SOLVED]
Post by: Raika on January 10, 2018, 08:21:31 AM
What is the best way to send array with photon? I have hashtable(type:int), i wanna somehow send this data, from what i know hashtable is not supported by RPC, but what with array?
Title: Re: Send array with photon?
Post by: jeanfabre on January 10, 2018, 10:06:33 PM
Hi,

 For now, only string is supported to be sent via RPC.

 you can support more types, but you will need to plug that manually in the code.

The thing with RPC is that it should be taken care of with extreme care when it comes down to data being sent out, because it quickly gets out of hands and compromise network bandwidth and overall game experience, that's why I only support string.

 What you can do, is construct a string out of your array ( using get next you add to the string each values) and on the other side, deconstruct ( use "," as a delimiter for each of your item).

Bye,

 Jean


Title: Re: Send array with photon?
Post by: Raika on January 11, 2018, 02:16:04 AM
Thanks Jean.
Title: Re: Send array with photon?[SOLVED]
Post by: 600 on January 11, 2018, 02:52:02 AM
There is also  custom action Build String from Array and Split array to string.
Title: Re: Send array with photon?[SOLVED]
Post by: jeanfabre on January 12, 2018, 12:12:54 AM
Hi,

 Ah Good, thanks for reminding me... too much actions!! :)

 Bye,

 Jean