Send multiple data via RPC to limit message [Photon Cloud]

Hi every body !

I would like to know if it’s possible to sent multiple data with RPC?

I’m working on a 2d game like a mmorpg on Android, and i have done a little system to movement and send RPC to know the movement of other player. it’s working but sometimes the exact position can change and i need to send the new position to lerp to this position in the same time than other RPC. but i’m very limited about the number of message send/s

I know how RPC is working, but at this moment i’m only use to send one INT, or string.

I want to send 2 int in the same method in one RPC, or a int with a vector 2.

So if someone can tell me if that is possible and how can i do i’ll really appreciate !

Thx a lot, and have a good day !

You could use a serialization method such as JSON (supported in Unity) to produce a string object containing whatever shape data you want, and send it over as a string.

Yeah i read about that, but i’m doing a android Game, and i think to know that is a problem no? :confused:

Thx for you’re reply!

up :slight_smile:

JSON is platform independent, if that was your question.

It’s just cause i read about Json work not like a PC game with a android project ^^

Be careful what you read. JSON has no platform awareness whatsoever.

Specific implementations of JSON may have issues but there are many different ones to choose from.

If you use the one built into Unity, you’ll probably encounter the least friction in a Unity project.