Skip to content
This repository was archived by the owner on Oct 11, 2023. It is now read-only.

Commit c8e8ba8

Browse files
committed
Initial Upload
Added the 16 Bit Plugin for Network Check for Android and iOS
1 parent 2deb551 commit c8e8ba8

3,440 files changed

Lines changed: 28212 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vs/UnityNetworkCheck/v15/.suo

129 KB
Binary file not shown.
736 KB
Binary file not shown.
32 KB
Binary file not shown.
752 KB
Binary file not shown.

Assembly-CSharp-firstpass.csproj

Lines changed: 316 additions & 0 deletions
Large diffs are not rendered by default.

Assembly-CSharp.csproj

Lines changed: 321 additions & 0 deletions
Large diffs are not rendered by default.

Assets/NetworkCheckExample.cs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
using UnityEngine.UI;
5+
6+
public class NetworkCheckExample : MonoBehaviour {
7+
8+
NetworkCheck networking;
9+
10+
void Start () {
11+
networking = new NetworkCheck();
12+
}
13+
14+
void Update ()
15+
{
16+
string message = "Offline";
17+
Color newColor = new Color(1, 0, 0);
18+
19+
//Call 'CheckOnline' to check if there is an internet connection
20+
if(networking.CheckOnline)
21+
{
22+
message = "";
23+
//Call 'CheckWifiState' to see if there is a WiFi Connection
24+
if (networking.CheckWifiState)
25+
{
26+
message = "Online Wifi ";
27+
newColor = new Color(0, 1, 0);
28+
}
29+
30+
//Call 'CheckMobileState' to see if there is a Mobile Data Connection
31+
if (networking.CheckMobileState)
32+
{
33+
message += "Online Mobile";
34+
newColor = new Color(0, newColor.g, 1);
35+
}
36+
}
37+
38+
transform.GetChild(0).GetComponent<Image>().color = newColor;
39+
transform.GetChild(1).GetComponent<Text>().text = message;
40+
}
41+
}

Assets/NetworkCheckExample.cs.meta

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/Plugins/16 Bit Networking.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)