OnSerializeNetworkView not doing anything

My code can be found here. Everything works fine except when I am trying to Network my game, the two Objects can see eachother but whenever you move your GameObject it only moves on your screen, not the other person’s screen which, as far as I am aware, is what OnSerializeNetworkView handles.

But it seems that the function in my code does not even get called. At no point in time during the playing of my game do I see any of the Debug messages in the console, which is the weird thing about it. It seems the entire OnSerializeNetworkView function is not even being called. Am I supposed to call it manually, in the Update() function or something? I was under the impression is was called automatically by Unity.

According to the documentation (http://unity3d.com/support/documentation/Components/class-NetworkView.html) you need to set observed to the script containing OnSerializeNetworkView().

Did you attach a NetworkView component to your gameobjects? Did you set it up correctly?

If you set it up to synch your transform, it will synch the position without you writing the serialization code yourself, too.

This tutorial helped me a lot to understand the unity multiplayer mechanics: