Working around OnNetworkInstantiate() bug

in unity’s docs, it clearly says that I should be able to find out who instantiated something by checking info.sender in OnNetworkInstantiate().

http://unity3d.com/support/documentation/ScriptReference/Network.OnNetworkInstantiate.html

But, when one client instantiates something, info.sender references the server when read on other clients. networkView.owner also has this same behaviour.

So how am I supposed to find out who actually owns an object that has been Network.Instantiated?

Darn, You got me. That’s a good question NetworkGuy.

That is intended. Each client is only connected to the server, and from their perspective everything is owned by the server and the server is the only other player. info.sender will only be “accurate” on the server, or if sender is actually the server.

Useless behaviour. And also contrary to what it says in their own docs…

I agree that it’s useless, but “the player who sent the message” isn’t technically wrong. Unity networking is client-server, so all network messages from clients go through the server and are re-routed to the receiving client(s); so the sender literally is always the server.