I have the following RPC call:
RPC (“Function”, int, int)
calling the following function :
Function (byte, byte)
what gets sent through the network? an int or a byte ?
And is there explicit type conversion commands in JS?
I have the following RPC call:
RPC (“Function”, int, int)
calling the following function :
Function (byte, byte)
what gets sent through the network? an int or a byte ?
And is there explicit type conversion commands in JS?
It shouldn’t be possible to call an RPC function with incorrect types in the parameter list. You should get an error. What do the exact code lines look like? In any case the types passed to the RPC function are sent over the network and they are interpreted on the other side according to the RPC function definition there.
I noticed … RPC doesn’t support bytes …
(request # 34189)
Yes, its “awkward” since it supports byte[ ]
By the way, in the docs there’s no mention to it being able to send byte[ ] (http://unity3d.com/support/documentation/Components/net-RPCDetails.html, submitted bug report).
It would be nice to support shorts too.
Thanks for the tip, maybe a byte[1] would do