Unity SDK 集成 如果您想使用 Unity SDK 监测广告收入,可以借助 SDK 到 SDK 集成,将数据发送到 Adjust 服务器。 操作前须知 要使用该功能,请先为您的应用下载并设置对应的 Adjust 安卓 SDK。 要求 安卓 SDK 4.29.1 及更新版本 要了解更多信息,请查看 Unity Mediation API和展示事件文档。 示例 // implement an impression listenerfinal IImpressionListener impressionListener = new IImpressionListener() { @Override public void onImpression(@NonNull String adUnitId, @Nullable ImpressionData impressionData) { // send impression data to Adjust AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AD_REVENUE_UNITY); adjustAdRevenue.setRevenue(impressionData.getPublisherRevenuePerImpression(), impressionData.getCurrency()); // optional fields adjustAdRevenue.setAdRevenueNetwork(impressionData.getAdSourceName()); adjustAdRevenue.setAdRevenueUnit(impressionData.getAdUnitId()); adjustAdRevenue.setAdRevenuePlacement(impressionData.getAdSourceInstance()); // Send Adjust ad revenue Adjust.trackAdRevenue(adjustAdRevenue); }}; // subscribe the impression listener to the impression event publisherImpressionEventPublisher.subscribe(impressionListener); // unsubscribe the impression listener from the impression event publisherImpressionEventPublisher.unsubscribe(impressionListener);