Gamebase SDK for Unity 2.75.1 Toast Gamebase Platform

Loading...
Searching...
No Matches

## ◆ GetNetworkType()

static GamebaseNetworkType GetNetworkType | ( |  | ) |
| static

Reports the type of network.

Since
  Added 1.4.0.

Returns
  One of GamebaseNetworkType.TYPE_NOT, GamebaseNetworkType.TYPE_MOBILE, GamebaseNetworkType.TYPE_WIFI, GamebaseNetworkType.TYPE_ANY.

Example Usage :

public void GetNetworkTypeSample()
{
// GamebaseNetworkType.TYPE_NOT : Not connected.
// GamebaseNetworkType.TYPE_MOBILE : A Mobile data connection. (3G, 4G, 5G, LTE ...)
// GamebaseNetworkType.TYPE_WIFI : A WIFI data connection.
// GamebaseNetworkType.TYPE_ANY : All the rest values.
GamebaseNetworkType networkType = Gamebase.Network.GetNetworkType();
Debug.Log(string.Format("networkType:{0}", networkType));
}
Toast.Gamebase.Gamebase.Network.GetNetworkType
static GamebaseNetworkType GetNetworkType()
Reports the type of network.
Definition: Gamebase.cs:3102
Toast.Gamebase.Gamebase.Network
The Network class indicates Network status.
Definition: Gamebase.cs:3081
Toast.Gamebase.Gamebase
The Gamebase class is core of Gamebase service.
Definition: Gamebase.cs:11