playMaker

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

Raika

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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14471
  • Official Playmaker Support
    • View Profile
Re: Send array with photon?
« Reply #1 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



Raika

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

600

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

jeanfabre

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

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

 Bye,

 Jean