The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Rpc parameters

2021-06-30 07:49:46

hi.. I've been dealing with rpc for a while, but I couldn't figure out how to write method parameters, especially piece and Vector2Int gridpoint parameter method, how should I write them when calling the method with rpc? I will be glad if you help. here are my codes..

MoveSelector Script..

Gamemanager Script...

Geometry Script...


2021-06-30 09:47:20

Vector2Int is not a type that PUN de/serializes out of the box. It needs to be added as custom type (or you use Vector2).

What are the issues you run into?

2021-06-30 09:56:27

I need to use the gridpoint parameter to call the method, how can I add it as a custom type?

2021-06-30 15:39:12

Have a look at CustomTypesUnity.cs. It registers a few types of Unity as custom types for Photon.
There is also a doc about serialization in PUN.

2021-06-30 15:42:34

thanks I think I need to adapt it to my project as Vector2Int by looking at Vector2 examples

Back to top