Skip to main content

ToolsResultObserver

Register the callback of the Player Network SDK Tools module, the game needs to process the callback function. For more information on the callback data structure, see GUAToolsResult.

note

[Player Network SDK & MSDK] It is strongly recommended to perform registration in the startup function of the game application.

Function Definition

The list of methods used to process the callback events.

Callback EventCommon[Player Network SDK Only][MSDK Only]
ToolsResultEventsConvertShortUrl--
event OnResultHandler<GUAToolsResult> ToolsResultEvents;

Code Sample

UnionAdapterAPI.GetToolsService().ToolsResultEvents += OnToolsResult;

UnionAdapterAPI.GetToolsService().ToolsResultEvents -= OnToolsResult;

private void OnToolsResult(GUAToolsResult result)
{
string methodTag = "";
if (result.MethodId == (int)GUAMethodID.GUA_TOOLS_CONVERT_SHORT_URL)
{
methodTag = "CoverShortUrl";
}
Debug.Log(methodTag + result.ToString());
}