Unity UNET how to connect to local network(same wifi)

So I’m trying to make game in which you can connect to friends if they are connected to same wifi router without internet. On same computer I can host game an then join in other game window but I can’t figure out how to join between two computers on same wifi.
Anyone can help? Documentation, sample projects, tutorial anything?

Here’s a login program that I made from a youtube tutorial here… Unity3d Tutorial - Server & Client - YouTube .

I commented a lot of this out to help teach my son learn networking. This tutorial will show (pretty simply) how to connect and share information over LAN/WiFi.
Hope this helps.

using UnityEngine;
using System.Collections;
public class Menu : MonoBehaviour 
{

	public string ip = "169.254.17.167";
	public int port = 25000;
	
	void OnGUI()
	{
		//if the player is NOT connected
		if(Network.peerType == NetworkPeerType.Disconnected)
		{
			//this is temporary for input of the ip address
			//find out your ip address and assign it here during gameplay
			ip = GUI.TextField(new Rect(200, 100, 100, 25), ip);
			port = int.Parse(GUI.TextField(new Rect(200, 125, 100, 25),""+ port));
			
			//if the player wants to connect to a server
			if(GUI.Button(new Rect(100,100,100,25), "Start Client"))
			{
				//this is where we actually connect to the server
				Network.Connect(ip, port);				
			}
			
			//if the player wants to start a server
			if(GUI.Button(new Rect(100,125,100,25), "Create Server"))
			{
				Network.InitializeServer(10, port,false);
			}
		}//end of "if the player is NOT connected"
		
		else //if the player IS connected
		{
			if(Network.peerType == NetworkPeerType.Client)
			{
				//letting the player know that they are a client to a server
				GUI.Label(new Rect(100,100,100,25), "Client");
				
				//if the player wants to disconnect
				if(GUI.Button(new Rect(100,125,100,25), "Logout"))
					Network.Disconnect(200);//the 200 is in milliseconds for the disconnect
			
			}
			
			if(Network.peerType == NetworkPeerType.Server)
			{
				//letting the player know that they are a server
				GUI.Label(new Rect(100,100,100,25), "Server");
				
				//this shows how many people are connected to your server
				GUI.Label(new Rect(100,125,100,25), "Connections: " + Network.connections.Length);
				
				//if the player wants to disconnect
				if(GUI.Button(new Rect(100,150 ,100,25), "Logout"))
					Network.Disconnect(200); //the 200 is in milliseconds for the disconnect
			
			}
		}//end of "if the player IS connected"
		
	}
}

I have Linksys WRT1900AC AC1900 Dual-Band Wi-Fi Router" Linksys router, After the installation, I connected a Lan with a modem to access an internet via Laptop but I can’t find the local address to connect two different systems. It seems like I’m not able to connect with them. Can I contact Linksys support experts at https://www.routertechnicalsupportnumbers.com/linksys-router-support/ or not. Your support is precious to me.

I was trying to do it, but before it succeeds it creates an error, may I ask how can I resolve this or could you please provide me a brief description to the point. Besides this should it possible to take help for the issue from D-Link Router Customer Support from routercustomercare.co please reply me.,I was trying your tips, but unfortunately, there occurs an issue due to which it cannot be possible. Could you please, provide me the brief description or points? Is it able to get help from D-link router customer support from routercustomercare.co . please reply me .

Even I made a same attempt to do so, however, I failed to succeed in it. But to secure my all online activity, I download AOL Shield Support which is working as a safety guard for all my online works. Besides, for my further queries I visited their website for help and found it useful.

Hi @Endless_Aftermath,
i done but in my phone i can not connect to PC, can you help me to do that!,

HI guys,
Two additional options, I tested on my game (Dungeons and Undead);

  • Rewired. On Asset Store. It works very well, it handles everything. I tested connecting my mobile as gamepad to PC Unity build, no issues.
  • Steam networking. If your game is going to be on Steam, just use Steam steamwork system. It is very powerful and relatively easy to use, once you get the some examples working. Creating lobbies, sorting them distance, joining lobbies, invite friends, etc.

I was facing the same problem, my friend, and I got rid of this problem by just taking some easy steps, which is to go to the router’s page 192.168.1.1, including clicking on the firewall settings, then reducing the level of protection to the lowest degree, and then rebooting the router, good luck.