Skip to main content

ToolsResultObserver

Register the callback for the Tools module. The game needs to register the callback for processing.For more information on the callback data structure, refer to GUAToolsResult.

note

[Player Network SDK & MSDK] It is strongly recommended that the game registers in the application startup function.

Function Definition

Method list for handling callback events

Callback eventCommon[Player Network SDK only][MSD only]
ToolsResultEventsConvertShortUrl*-
event OnResultHandler<GUAToolsResult> ToolsResultEvents;

Code Example

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());
}