|
In simple, Unity just doesn't want to call my RPC functions. My project is set up where a different scene and different script does the networking. For clients, the script is called "ConnectionScript", for server the script is called "ServerScript". They are both on the same viewID and both have a networkView attached to them with reliable compressed. The code when I call (From ConnectionScript) is this: The RPC code is (ServerScript): All connections work fine and I can easily connect to the server, but once I try and send an RPC, nothing appears to happen. I have the project settings set to run in the background, too. Could somebody point me in the right direction? Thanks!
(comments are locked)
|
|
Both sides need the RPC function "test". They can be different functions, but both sides need to have the function since it is possible to call it on your own client. Usually you should get an error message that the RPC function wasn't found. Have you checked the error log? Really? Who came up with that idea? It seems pretty strange to do that. I was initially using the method to authenticate a user, ie. networkView.RPC("Auth", RPCMode.Server, "auth-code-here"); Does this mean I'll have to have a function which just sits there doing nothing in my client sided script: public void Auth() { } Or does it take the same parameters? Thanks.
May 06 '12 at 05:03 PM
alexc1995
(comments are locked)
|
