- Home /
SetLevelPrefix not working as intended?
I have a server-client model with two different types of clients. Client type A sets its LevelPrefix to 1. Client type B sets it LevelPrefix to 2. This happens in the Awake() methods of my NetworkManager class.
Client type A, and the server perform
void Awake()
{
// Increase the rate at which packets are sent to clients.
Network.sendRate = 60; // 60 times per second
Network.SetLevelPrefix(1);
}
Client type B performs:
void Awake()
{
// Increase the rate at which packets are sent to clients.
Network.sendRate = 60; // 60 times per second
Network.SetLevelPrefix(2);
}
Most of my data must go to client A, some of it to client B. If I want to send data to client B I do the following:
Network.SetLevelPrefix(2);
networkView.RPC ("AddProduct", RPCMode.Others, "OjaHello");
Network.SetLevelPrefix(1);
It works fine, so no problem there. It works as long as I keep the NetworkViewID's the same if I call RPC's. However this shows up in my log file on client B:
Received state update for view id' SceneID: 108 Level Prefix: 0' but the NetworkView doesn't exist View ID SceneID: 102 Level Prefix: 0 not found during lookup. Strange behaviour may occur
What is going on here? Why is this happening? It should not be sending anything with Level Prefix 0. All the data is handled correctly as far as I can tell.