By now, you might be aware of NPSettings. In-case if its new to you, read this post.
In your Unity project, If Network Connectivity is not enabled, enable by below steps.
- Open NPSettings and select Application Settings.
- Under supported features section, Enable Uses Network Connectivity checkbox and Save (see button at bottom).
Once you have Network Connectivity feature enabled, select Network Connectivity Settings. Let us take a brief look into it:
- IP Address – Server IP address to which reachability needs to be checked.
- Editor & Android Settings
|Time Out Period||Specify the timeout for checking connectivity status.|
|Port||Specify port you want to connect to.|
|Max Retry Count||Count till which retry needs to be done to report a status.|
|Time Gap Between Polling||Time gap that needs to be considered for two successive pings.|
On Editor, connectivity check uses ping class. On iOS & Android its done with sockets.