Hi,
I’m completely lost with this one.
I have a GameObject A who does have a NetworkView component. On Start A calls Network.Instantiate in order to instantiate a GameObject B in every other networked clients.
Then I use OnSerializeNetworkView on A to modify some properties of B. The NetworkView Component is set with the script in charge of OnSerializeNetworkView.
The problem is that only the host receive informations. When I only have two players (a host and a client) everything is fine, every players can see modification on each other’s object. But when I have more than two players (say a host and two clients) every clients can see host’s object modifications (and viceversa) but a client can’t see another client’s object modification.
Example of my code (very basic) :
private void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info)
{
if ( stream.isWriting )
{
int color = my_color;
stream.Serialize(ref color);
}
else
{
int color = 0;
stream.Serialize(ref color);
Debug.Log("receiving: " + networkView.viewID + " -- " + color);
// will log in client<->host but not in client<->client
}
}
Is there a trick to know?