Network Programming in Unity

I am new in Unity Network programming…Basically I want to make connection between two android devices through wifi using client server model. I have some question.

How can we make a server having specific IP
How can we make a client who will connect to that server.
How can we transfer messages between these two client and server

Any idea,Any help

If You are new to network programming then I would suggest learning about the

Unity Master Server,


Unity Master Server Reference

function OnGUI()
if(GUILayout.Button(" Initlized server"))
Debug.Log(“Server has been Initlized”);
if(GUILayout.Button(“connect to server”))
function OnConnectedToServer() {
Debug.Log(“Connected to server”);
// Send local player name to server …

I have write this simple code but OnConnectedToServer doesnot give me any responce…