check if someone s on the same wifi unity code example
Example: unity check if device has wifi
public bool internetConnectivity()
{
UnityWebRequest request = UnityWebRequest.Get("https://www.google.com/");
request.SendWebRequest();
if (request.error != null)
{
Debug.LogWarning("No internet connection");
return false;
}
else
{
return true;
}
}