Documentation Index
Fetch the complete documentation index at: https://docs.cloudx.io/llms.txt
Use this file to discover all available pages before exploring further.
Trusted Arbiter 会比较已加载的 CloudX 出价与受支持的第三方出价,并返回选中的平台。从 Unity SDK 4.1.0 起可用(底层依赖 Android SDK 4.1.1 和 iOS SDK 3.4.1),支持 CloudX、Unity LevelPlay 和 PubMatic 出价输入。
使用各 SDK 已加载广告对象或广告信息对象来填充出价值:
using CloudX;
using System.Collections.Generic;
using UnityEngine;
// cloudXAd 是 OnAdLoaded 回调中的 CloudXAd 对象。
// levelPlayAdInfo 是 Unity LevelPlay 广告信息对象。
// pubMaticPrice 和 pubMaticPartnerName 来自 PubMatic/OpenWrap 出价对象。
var bids = new List<CloudXArbiterBid>
{
new CloudXArbiterBid.CloudX(cloudXAd),
new CloudXArbiterBid.LevelPlay(
NetworkName: levelPlayAdInfo.adNetwork,
Revenue: levelPlayAdInfo.revenue,
Precision: levelPlayAdInfo.precision
),
new CloudXArbiterBid.PubMatic(
Price: pubMaticPrice,
PartnerName: pubMaticPartnerName
),
};
CloudXSdk.Arbiter(bids, result =>
{
Debug.Log($"Selected platform: {result.Platform}");
});
如果 arbiter 服务不可用,SDK 会在传入的受支持出价中回退选择可比较美元出价最高的平台。