playMaker

Author Topic: Send array with photon?[SOLVED]  (Read 3418 times)

Raika

  • Playmaker Newbie
  • *
  • Posts: 30
Send array with photon?[SOLVED]
« on: January 10, 2018, 10: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?
« Last Edit: January 11, 2018, 04:16:33 AM by Raika »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send array with photon?
« Reply #1 on: January 11, 2018, 12:06:33 AM »
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



Raika

  • Playmaker Newbie
  • *
  • Posts: 30
Re: Send array with photon?
« Reply #2 on: January 11, 2018, 04:16:04 AM »
Thanks Jean.

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 714
    • Flashing Lights
Re: Send array with photon?[SOLVED]
« Reply #3 on: January 11, 2018, 04:52:02 AM »
There is also  custom action Build String from Array and Split array to string.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Send array with photon?[SOLVED]
« Reply #4 on: January 12, 2018, 02:12:54 AM »
Hi,

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

 Bye,

 Jean