x


Is my rpc sending or can I debug the buffer?

I have a complete networking game and am adding some modifications, The problem is I have a function with the RPC attribute and it has a networkview and I call it using all buffered, the server is calling the function and the function just changes the texture of the gameobject, for some reason nothing is changing. Is there some way to debug the buffer and check if the function call is sent properly?

more ▼

asked Jul 31 '12 at 08:40 PM

B00TALMIGHTY gravatar image

B00TALMIGHTY
3 1 3

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Debug in the rpc call and then you know if the function is being called or not ie

void SendRPC(){ Debug.Log("sending RPC"); networkView.RPC("DoSomething", RPCMode.AllBuffered); }

[RPC] void DoSomething(){ Debug.Log("rpc received");

}

more ▼

answered Aug 01 '12 at 05:58 PM

strachpr01 gravatar image

strachpr01
111 3

So the lack of a debug message would then mean it is not working if so thank you.

Aug 01 '12 at 06:26 PM B00TALMIGHTY

that's correct if you do not receive both the messages then something is not being called. If not please post a snippet of your code and I will try to work out the problem

Aug 01 '12 at 07:21 PM strachpr01

For some reason this rpc did not go through, but all of my other rpcs are working fine. I changed the code to actually not require an rpc, thank you for your help.

Aug 01 '12 at 07:27 PM B00TALMIGHTY

no problem I have had lots of lovely problems like this myself

Aug 01 '12 at 07:31 PM strachpr01
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x702
x239
x237
x22

asked: Jul 31 '12 at 08:40 PM

Seen: 300 times

Last Updated: Aug 01 '12 at 07:31 PM