x


How to send timestamp via RPC so it was relative to the receiver?

The fact is Network.time is peer-relative and makes sense only when used with NetworkMessageInfo.timestamp withing OnSerializeNetworkView() method.

But I want to use an RPC and not the auto-syncing via OnSerializeNetworkView(). How can I send timestamps via RPC so it was valid for receiving peer???

Thank you.

more ▼

asked Nov 03 '10 at 08:27 AM

Anton Petrov gravatar image

Anton Petrov
447 10 11 23

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

1 answer: sort voted first

OMG, there's internal parameter 'info : NetworkMessageInfo' appended to each RPC parameter list if you wish.

Like here:

@RPC
function PrintText (text : String, info : NetworkMessageInfo)
{
    Debug.Log(text + " from " + info.sender);
}
more ▼

answered Nov 03 '10 at 08:34 AM

Anton Petrov gravatar image

Anton Petrov
447 10 11 23

(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:

x711
x702
x573
x237

asked: Nov 03 '10 at 08:27 AM

Seen: 1595 times

Last Updated: Nov 03 '10 at 08:27 AM