Gamebase SDK for Unity  1.10.0
Toast Gamebase Platform

◆ AddOnChangedStatusListener()

static bool AddOnChangedStatusListener ( GamebaseCallback.DataDelegate< GamebaseNetworkType >  callback)
static

Add the callback to be called when the network status is changed.

Since
Added 1.4.0.
Deprecated:
As of release 1.8.0, use Gamebase.AddObserver(observer) method instead.
Parameters
callbackThe callback to be invoked when the network status is changed.
Returns
"true" if callback registration succeeded, "false" otherwise

Example Usage :

{
bool isSuccess = Gamebase.Network.AddOnChangedStatusListener(OnChangeNetworkMain);
}
public void OnChangeNetwork(GamebaseNetworkType type)
{
Debug.Log(string.Format("OnChangeNetwork GamebaseNetworkType : {0}", type.ToString()));
}