Gamebase SDK for Unity  1.5.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.
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()));
}