Rpc parameters
The whole answer can be found below.
Try Our
Documentation
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.
Read More on
Stack Overflow
Find more information on Stack Overflow (for Circle members only).
Rpc parameters
Zeohack
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...
Comments
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?
I need to use the gridpoint parameter to call the method, how can I add it as a custom type?
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.
thanks I think I need to adapt it to my project as Vector2Int by looking at Vector2 examples
Back to top