Skip to content

TCB module

A module that runs Cloud Functions registered in Tencent CloudBase (TCB) from the app. The Hive Axyl server calls TCB on behalf of the app and returns the execution result.

Module information

Item Value
Package com.com2usplatform.hiveaxyl.tcb
Namespace Hive.Axyl.Tcb
Supported platforms All (server API)
Minimum requirements Unity 6000.0+

Provided interfaces

Interface Registration method Description
ITcbService AddTcb() Cloud Function execution

For how to set up the TCB integration environment and develop Cloud Functions, see TCB Connector.

Registration and retrieval

Register the module with AddTcb() in the registration step of HiveBootstrap.Initialize, and then retrieve it with HiveCore.Resolve<T>().

using Hive.Axyl.Core;
using Hive.Axyl.Core.Unity;   // HiveBootstrap
using Hive.Axyl.Tcb;

var config = CoreConfig.CreateBuilder("{appId}").Build();

HiveBootstrap.Initialize(config, builder =>
{
    builder.AddTcb();
});

ITcbService tcb = HiveCore.Resolve<ITcbService>();

The methods of ITcbService require a login session.