Hello everyone,
I am changing a “network architecture” of my project from the old networking system to the new one using UNet / HLAPI. I am totally new to the new system.
By the way, I believe the new system is less flexible from the first one. You don’t have much control as before … Anyway …
###Context
I understood that the system is a server authoritative system, thus, all the data must be sent to the server before being sent to all the clients. And the fact that all the clients receive the data is exactly what I don’t want. A similar problem I have is that spawning objects create the objects on all the clients.
###Problem
I would like to prevent this last behaviour since my clients really don’t care about the other clients, and I would like to save some bandwidth (it’s very critical for the system I am making).
With the old system, I was using networkView groups from my clients as follow :
void Awake()
{
// All network messages and RPC calls go through this group number
networkView.group = 1;
// Disable transmission of messages and RPC calls on the network group number 1.
if( Network.isServer )
{
Network.SetSendingEnabled( 1, false );
}
}
But with the new system, I don’t know if it’s still possible.
But now, my first problem is to prevent the spawning of players on each clients. I could what I already made but if there is the new system, I guess it’s possible with it too !
###Alternative
If there is no way, I could just send an order to the clients to instantiate their players, and instantiate each players on the server too, but how can I make them communicate ? (Using NetworkViewId like before ?)