Skip to main content
Version: 3.0.0

Native

The SDK will handle the native AD loading logic internally, and the game side can call the display/hide native method as needed.

Is Native ad available

var isNativeReady = HCSDKManager.Instance.IsNativeAdReady();

if (isNativeReady)
{
HCDebugger.LogDebug("Native ad is ready ");

}else
{
HCDebugger.LogDebug("Native ad not ready");
}

Showing a Native Ad

public void Button_ShowNative()
{
HCSDKManager.Instance.ShowNative(nativeImage.rectTransform);
}
API:
void ShowNative(RectTransform pRect, Camera pCam = null, string pAdPos = "");

RectTransform :Need to display the RectTransform of the native AD Image.
pCam :If the UI uses camera mode, you must use an orthogonal camera.
pAdPos :Display native ads in the location of the dot.

Native location explanation

Set the transparency of nativeImage to 0. This is set to white just to show the size of the native AD.
Need to show native location:

Removing a Native Ad

public void Button_RemoveNative()
{
HCSDKManager.Instance.RemoveNative();
}
When there is a call to display Native advertising interface, be sure to call to remove Native advertising interface, otherwise there will be a blocking game problem.