0
//On my server, I used InitializeServer to Start the Server 
Network.InitializeServer (10, 1234, useNat);    
//On my client side to connect 
Server.Network.Connect("127.0.0.1", 1234);

Now, I want to send data to each other. For example, Server will send data to all clients, the count of clients connected. The client will accept that message and put the result in the UI Text.

I already read about NetworkMessage but It's only work if I used NetworkServer,Listen / NetworkClient.RegisterHandler. and also about [SyncVar] and [ClientRPC] but still I can't find my answer,

I'm hoping that somebody will help me about this. I just started learning about Unity Networking.

Source Code with a proper explanation will help, Unity Documentation made my head blow off.

Laurel
  • 5,965
  • 14
  • 31
  • 57
  • There functions are all obsoletes ! Try NetworkServer, NetworkServerSimple and NetworkClient. You can forget Network and Server, it's from the old system. – FLX Mar 28 '17 at 14:15
  • Any reason for not using NetworkManager, NetworkBehaviour. Otherwise you'll lose all benefit of using UNET (HLAPI) and you'll need to handle all yourself using UNET's LLAPI – kitta Mar 28 '17 at 15:36
  • ok ill search more about this, thank you for FLX and b.ben much appreciated – Ryan Jones Bayron Mar 29 '17 at 12:53

0 Answers0