Merge branch 'main' of http://v4.9ms.co:7777/yufeng/SDK_UnityMoney
This commit is contained in:
commit
fb022bf083
|
@ -41,11 +41,17 @@ public class AdjustManager : D_MonoSingleton<AdjustManager>
|
||||||
|
|
||||||
ShuShuEvent.Instance.Track("adjust_init");
|
ShuShuEvent.Instance.Track("adjust_init");
|
||||||
FireBaseAnalyticsManager.Instance.LogEvent("adjust_init");
|
FireBaseAnalyticsManager.Instance.LogEvent("adjust_init");
|
||||||
Adjust.GetAdid((id)=>
|
Adjust.GetAdid((id) =>
|
||||||
{
|
{
|
||||||
ShuShuEvent.Instance.SetSuperProperties(new Dictionary<string, object>() { { "adid", id } });
|
ShuShuEvent.Instance.SetSuperProperties(new Dictionary<string, object>() { { "adid", id } });
|
||||||
ShuShuEvent.Instance.UserSet(new Dictionary<string, object>() { { "adid", id } });
|
ShuShuEvent.Instance.UserSet(new Dictionary<string, object>() { { "adid", id } });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var network = AdjustNetwork.GetNetwork();
|
||||||
|
if (!string.IsNullOrEmpty(network))
|
||||||
|
{
|
||||||
|
RushSDKManager.Instance.OnUserSourceListener?.Invoke(IsOrganic(network), network);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -128,7 +134,7 @@ public class AdjustManager : D_MonoSingleton<AdjustManager>
|
||||||
campaign = attribution.Campaign;
|
campaign = attribution.Campaign;
|
||||||
adgroup = attribution.Adgroup;
|
adgroup = attribution.Adgroup;
|
||||||
creative = attribution.Creative;
|
creative = attribution.Creative;
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(attribution.Network))
|
if (!string.IsNullOrEmpty(attribution.Network))
|
||||||
{
|
{
|
||||||
network = attribution.Network;
|
network = attribution.Network;
|
||||||
|
@ -139,7 +145,7 @@ public class AdjustManager : D_MonoSingleton<AdjustManager>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
network = "Organic";
|
network = "Organic";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,6 +166,8 @@ public class AdjustManager : D_MonoSingleton<AdjustManager>
|
||||||
{ "adgroup", adgroup ?? "" },
|
{ "adgroup", adgroup ?? "" },
|
||||||
{ "creative", creative ?? "" },
|
{ "creative", creative ?? "" },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
RushSDKManager.Instance.OnUserSourceListener?.Invoke(IsOrganic(network), network);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,14 @@ public class AdjustNetwork : D_MonoSingleton<AdjustNetwork>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetNetwork()
|
||||||
|
{
|
||||||
|
return PlayerPrefs.GetString(KEY_USER_NETWORK);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否是自然量用户
|
/// 是否是自然量用户
|
||||||
/// 默认买量用户
|
/// 默认自然量用户
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool InOrganic()
|
public bool InOrganic()
|
||||||
|
@ -42,7 +46,7 @@ public class AdjustNetwork : D_MonoSingleton<AdjustNetwork>
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (network.ToLower().Replace(" ", "") == "Organic".ToLower().Replace(" ", ""))
|
if (network.ToLower().Replace(" ", "") == "Organic".ToLower().Replace(" ", ""))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace WZ
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void TrackKwiWaterfallFill(AdsType adsType, string requestId, string unitId,
|
public static void TrackKwiWaterfallFill(AdsType adsType, string requestId, string unitId,
|
||||||
float floorPrice, int waterfallRequestNumber, int unitRequestNumber, int floorNumber,float value)
|
float floorPrice, int waterfallRequestNumber, int unitRequestNumber, int floorNumber,double value)
|
||||||
{
|
{
|
||||||
var eventName = "kwai_waterfall_fill";
|
var eventName = "kwai_waterfall_fill";
|
||||||
var dic = new Dictionary<string, object> {
|
var dic = new Dictionary<string, object> {
|
||||||
|
|
|
@ -107,7 +107,7 @@ namespace WZ
|
||||||
{
|
{
|
||||||
public string id;
|
public string id;
|
||||||
public string unite_id;
|
public string unite_id;
|
||||||
public int price;
|
public float price;
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GoogleMobileAds.Common;
|
using GoogleMobileAds.Common;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using KwaiAds.Scripts.Api;
|
||||||
using KwaiAds.Scripts.Api.Interstitial;
|
using KwaiAds.Scripts.Api.Interstitial;
|
||||||
using KwaiAds.Scripts.Api.Reward;
|
using KwaiAds.Scripts.Api.Reward;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
@ -21,8 +22,11 @@ namespace WZ
|
||||||
private bool _isRequestingFloors = false;
|
private bool _isRequestingFloors = false;
|
||||||
private List<FloorConfig> _currentRequestBatch = new List<FloorConfig>();
|
private List<FloorConfig> _currentRequestBatch = new List<FloorConfig>();
|
||||||
private FloorConfig _successfulFloor = null;
|
private FloorConfig _successfulFloor = null;
|
||||||
|
|
||||||
public float _ivStartLoadTime = 0;
|
public float _ivStartLoadTime = 0;
|
||||||
|
private int _waterfallRequestCount = 0; // waterfall请求次数
|
||||||
|
private Dictionary<string, int> _unitIdRequestCounts = new Dictionary<string, int>(); // 每个unit_id的请求次数
|
||||||
|
private string _currentRequestId; // 当前waterfall请求的ID
|
||||||
|
|
||||||
|
|
||||||
public void InitializeWithFloors()
|
public void InitializeWithFloors()
|
||||||
{
|
{
|
||||||
|
@ -51,6 +55,10 @@ namespace WZ
|
||||||
_currentFloorIndex = 0;
|
_currentFloorIndex = 0;
|
||||||
_successfulFloor = null;
|
_successfulFloor = null;
|
||||||
_isRequestingFloors = true;
|
_isRequestingFloors = true;
|
||||||
|
_currentRequestId = GenerateRequestId();
|
||||||
|
|
||||||
|
// 增加waterfall请求计数
|
||||||
|
_waterfallRequestCount++;
|
||||||
|
|
||||||
// 清理之前的广告控制器
|
// 清理之前的广告控制器
|
||||||
foreach (var controller in _ivFloorAdControllers.Values)
|
foreach (var controller in _ivFloorAdControllers.Values)
|
||||||
|
@ -93,25 +101,54 @@ namespace WZ
|
||||||
{
|
{
|
||||||
RequestFloorAd(floor);
|
RequestFloorAd(floor);
|
||||||
}
|
}
|
||||||
|
AdsActionEvents.TrackKwaiWaterfallRequest(AdsType.Interstitial,
|
||||||
|
_currentRequestId,
|
||||||
|
_waterfallRequestCount,
|
||||||
|
_ivParallelRequests);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RequestFloorAd(FloorConfig floor)
|
private void RequestFloorAd(FloorConfig floor)
|
||||||
{
|
{
|
||||||
IInterstitialAdController controller = KwaiAds.Scripts.Api.KwaiAdsSdk.SDK.getInterstitialAdController();;
|
// 更新unite_id请求计数
|
||||||
|
if (!_unitIdRequestCounts.ContainsKey(floor.unite_id))
|
||||||
|
{
|
||||||
|
_unitIdRequestCounts[floor.unite_id] = 0;
|
||||||
|
}
|
||||||
|
_unitIdRequestCounts[floor.unite_id]++;
|
||||||
|
|
||||||
|
// 获取当前楼层在排序列表中的位置
|
||||||
|
int floorIndex = GetFloorIndex(floor.id);
|
||||||
|
LoggerUtils.Debug($"[kwai] floor inter Requesting floor {floor.id} (index: {floorIndex}), unite_id {floor.unite_id} has been requested {_unitIdRequestCounts[floor.unite_id]} times, request id: {GetUniteIdRequestCount(floor.unite_id)}");
|
||||||
|
|
||||||
|
IInterstitialAdController controller = KwaiAds.Scripts.Api.KwaiAdsSdk.SDK.getInterstitialAdController(); ;
|
||||||
_ivFloorAdControllers[floor.id] = controller;
|
_ivFloorAdControllers[floor.id] = controller;
|
||||||
|
|
||||||
KwaiInterstitialAdRequest kwaiInterstitialAdRequest = new KwaiInterstitialAdRequest(floor.unite_id);
|
KwaiInterstitialAdRequest kwaiInterstitialAdRequest = new KwaiInterstitialAdRequest(floor.unite_id);
|
||||||
|
kwaiInterstitialAdRequest.ExtParams[Constants.Request.BID_FLOOR_PRICE] = floor.price.ToString();
|
||||||
|
|
||||||
controller.Load(kwaiInterstitialAdRequest,
|
controller.Load(kwaiInterstitialAdRequest,
|
||||||
new FloorInterAdListener(this, floor),
|
new FloorInterAdListener(this, floor),
|
||||||
new FloorInterAdLoadListener(this, floor));
|
new FloorInterAdLoadListener(this, floor));
|
||||||
|
|
||||||
|
AdsActionEvents.TrackKwaiAdunitRequest(AdsType.Interstitial,
|
||||||
|
_currentRequestId,
|
||||||
|
floor.unite_id,
|
||||||
|
floor.price,
|
||||||
|
GetWaterfallRequestCount(),
|
||||||
|
GetUniteIdRequestCount(floor.unite_id),
|
||||||
|
floorIndex);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理楼层广告加载成功
|
// 处理楼层广告加载成功
|
||||||
public void OnFloorAdLoaded(FloorConfig floor, IInterstitialAdController controller)
|
public void OnFloorAdLoaded(FloorConfig floor, IInterstitialAdController controller,double revenue)
|
||||||
{
|
{
|
||||||
if (!_isRequestingFloors || _successfulFloor != null) return;
|
if (!_isRequestingFloors || _successfulFloor != null) return;
|
||||||
|
|
||||||
LoggerUtils.Debug($"[kwai] floor inter Floor ad loaded: {floor.id} with price: {floor.price}");
|
// 获取当前楼层在排序列表中的位置
|
||||||
|
int floorIndex = GetFloorIndex(floor.id);
|
||||||
|
LoggerUtils.Debug($"[kwai] floor inter ad loaded: {floor.id} (index: {floorIndex}) with price: {floor.price}, unite_id {floor.unite_id} has been requested {GetUniteIdRequestCount(floor.unite_id)} times, revenue: {revenue}, request id: {_currentRequestId}");
|
||||||
|
|
||||||
|
|
||||||
// 暂停其他并行请求
|
// 暂停其他并行请求
|
||||||
_successfulFloor = floor;
|
_successfulFloor = floor;
|
||||||
|
@ -125,6 +162,14 @@ namespace WZ
|
||||||
kvp.Value.Destroy();
|
kvp.Value.Destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AdsActionEvents.TrackKwiWaterfallFill(AdsType.Interstitial,
|
||||||
|
_currentRequestId,
|
||||||
|
floor.unite_id,
|
||||||
|
floor.price,
|
||||||
|
GetWaterfallRequestCount(),
|
||||||
|
GetUniteIdRequestCount(floor.unite_id),
|
||||||
|
floorIndex,
|
||||||
|
revenue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理楼层广告加载失败
|
// 处理楼层广告加载失败
|
||||||
|
@ -177,6 +222,53 @@ namespace WZ
|
||||||
_action?.Invoke();
|
_action?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取当前waterfall请求次数
|
||||||
|
/// </summary>
|
||||||
|
public int GetWaterfallRequestCount()
|
||||||
|
{
|
||||||
|
return _waterfallRequestCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取当前waterfall请求次数
|
||||||
|
/// </summary>
|
||||||
|
public int GetUniteIdRequestCount(string unitId)
|
||||||
|
{
|
||||||
|
return _unitIdRequestCounts.TryGetValue(unitId, out var time) ? time : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据floor.id获取其在排序后的楼层列表中的索引位置
|
||||||
|
/// </summary>
|
||||||
|
public int GetFloorIndex(string floorId)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < _sortedFloors.Count; i++)
|
||||||
|
{
|
||||||
|
if (_sortedFloors[i].id == floorId)
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1; // 未找到
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取当前Request ID
|
||||||
|
/// </summary>
|
||||||
|
public string GetCurrentRequestId()
|
||||||
|
{
|
||||||
|
return _currentRequestId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成唯一的Request ID
|
||||||
|
/// </summary>
|
||||||
|
private string GenerateRequestId()
|
||||||
|
{
|
||||||
|
return Guid.NewGuid().ToString("N");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
using KwaiAds.Scripts.Api;
|
||||||
using KwaiAds.Scripts.Api.Reward;
|
using KwaiAds.Scripts.Api.Reward;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static WZ.KwaiAdsConfigParser;
|
using static WZ.KwaiAdsConfigParser;
|
||||||
|
@ -19,8 +20,10 @@ namespace WZ
|
||||||
private bool _isRequestingFloors = false;
|
private bool _isRequestingFloors = false;
|
||||||
private List<FloorConfig> _currentRequestBatch = new List<FloorConfig>();
|
private List<FloorConfig> _currentRequestBatch = new List<FloorConfig>();
|
||||||
private FloorConfig _successfulFloor = null;
|
private FloorConfig _successfulFloor = null;
|
||||||
|
|
||||||
public float _rvStartLoadTime = 0;
|
public float _rvStartLoadTime = 0;
|
||||||
|
private int _waterfallRequestCount = 0; // waterfall请求次数
|
||||||
|
private Dictionary<string, int> _unitIdRequestCounts = new Dictionary<string, int>(); // 每个unite_id的请求次数
|
||||||
|
private string _currentRequestId; // 当前waterfall请求的ID
|
||||||
|
|
||||||
public void InitializeWithFloors()
|
public void InitializeWithFloors()
|
||||||
{
|
{
|
||||||
|
@ -51,7 +54,10 @@ namespace WZ
|
||||||
_currentFloorIndex = 0;
|
_currentFloorIndex = 0;
|
||||||
_successfulFloor = null;
|
_successfulFloor = null;
|
||||||
_isRequestingFloors = true;
|
_isRequestingFloors = true;
|
||||||
|
_currentRequestId = GenerateRequestId();
|
||||||
|
|
||||||
|
// 增加waterfall请求计数
|
||||||
|
_waterfallRequestCount++;
|
||||||
// 清理之前的广告控制器
|
// 清理之前的广告控制器
|
||||||
foreach (var controller in _rvFloorAdControllers.Values)
|
foreach (var controller in _rvFloorAdControllers.Values)
|
||||||
{
|
{
|
||||||
|
@ -61,6 +67,8 @@ namespace WZ
|
||||||
|
|
||||||
// 开始请求楼层广告
|
// 开始请求楼层广告
|
||||||
RequestNextFloorBatch();
|
RequestNextFloorBatch();
|
||||||
|
|
||||||
|
AdsActionEvents.TrackKwaiWaterfallRequest(AdsType.Rewarded, _currentRequestId, _waterfallRequestCount, _rvParallelRequests);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RequestNextFloorBatch()
|
private void RequestNextFloorBatch()
|
||||||
|
@ -97,21 +105,45 @@ namespace WZ
|
||||||
|
|
||||||
private void RequestFloorAd(FloorConfig floor)
|
private void RequestFloorAd(FloorConfig floor)
|
||||||
{
|
{
|
||||||
|
// 更新unite_id请求计数
|
||||||
|
if (!_unitIdRequestCounts.ContainsKey(floor.unite_id))
|
||||||
|
{
|
||||||
|
_unitIdRequestCounts[floor.unite_id] = 0;
|
||||||
|
}
|
||||||
|
_unitIdRequestCounts[floor.unite_id]++;
|
||||||
|
|
||||||
|
// 获取当前楼层在排序列表中的位置
|
||||||
|
int floorIndex = GetFloorIndex(floor.id);
|
||||||
|
|
||||||
|
LoggerUtils.Debug($"[kwai] floor reward Requesting floor {floor.id} (index: {floorIndex}), unite_id {floor.unite_id} has been requested {GetUniteIdRequestCount(floor.unite_id)} times, request id: {_currentRequestId}");
|
||||||
|
|
||||||
IRewardAdController controller = KwaiAds.Scripts.Api.KwaiAdsSdk.SDK.getRewardAdController();
|
IRewardAdController controller = KwaiAds.Scripts.Api.KwaiAdsSdk.SDK.getRewardAdController();
|
||||||
_rvFloorAdControllers[floor.id] = controller;
|
_rvFloorAdControllers[floor.id] = controller;
|
||||||
|
|
||||||
KwaiRewardAdRequest kwaiRewardAdRequest = new KwaiRewardAdRequest(floor.unite_id);
|
KwaiRewardAdRequest kwaiRewardAdRequest = new KwaiRewardAdRequest(floor.unite_id);
|
||||||
|
kwaiRewardAdRequest.ExtParams[Constants.Request.BID_FLOOR_PRICE] = floor.price.ToString();
|
||||||
|
|
||||||
controller.Load(kwaiRewardAdRequest,
|
controller.Load(kwaiRewardAdRequest,
|
||||||
new FloorRewardAdListener(this, floor),
|
new FloorRewardAdListener(this, floor),
|
||||||
new FloorRewardAdLoadListener(this, floor));
|
new FloorRewardAdLoadListener(this, floor));
|
||||||
|
|
||||||
|
AdsActionEvents.TrackKwaiAdunitRequest(AdsType.Rewarded,
|
||||||
|
_currentRequestId,
|
||||||
|
floor.unite_id,
|
||||||
|
floor.price,
|
||||||
|
GetWaterfallRequestCount(),
|
||||||
|
GetUniteIdRequestCount(floor.unite_id),
|
||||||
|
floorIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理楼层广告加载成功
|
// 处理楼层广告加载成功
|
||||||
public void OnFloorAdLoaded(FloorConfig floor, IRewardAdController controller)
|
public void OnFloorAdLoaded(FloorConfig floor, IRewardAdController controller,double revenue)
|
||||||
{
|
{
|
||||||
if (!_isRequestingFloors || _successfulFloor != null) return;
|
if (!_isRequestingFloors || _successfulFloor != null) return;
|
||||||
|
|
||||||
LoggerUtils.Debug($"[kwai] floor reward ad loaded: {floor.id} with price: {floor.price}");
|
// 获取当前楼层在排序列表中的位置
|
||||||
|
int floorIndex = GetFloorIndex(floor.id);
|
||||||
|
LoggerUtils.Debug($"[kwai] floor reward Floor ad loaded: {floor.id} (index: {floorIndex}) with floor price: {floor.price}, unite_id {floor.unite_id} has been requested {GetUniteIdRequestCount(floor.unite_id)} times, revenue:{revenue}");
|
||||||
|
|
||||||
// 暂停其他并行请求
|
// 暂停其他并行请求
|
||||||
_successfulFloor = floor;
|
_successfulFloor = floor;
|
||||||
|
@ -125,6 +157,14 @@ namespace WZ
|
||||||
kvp.Value.Destroy();
|
kvp.Value.Destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
AdsActionEvents.TrackKwiWaterfallFill(AdsType.Rewarded,
|
||||||
|
_currentRequestId,
|
||||||
|
floor.unite_id,
|
||||||
|
floor.price,
|
||||||
|
GetWaterfallRequestCount(),
|
||||||
|
GetUniteIdRequestCount(floor.unite_id),
|
||||||
|
floorIndex,
|
||||||
|
revenue);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理楼层广告加载失败
|
// 处理楼层广告加载失败
|
||||||
|
@ -165,7 +205,7 @@ namespace WZ
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowRewarded(Action _action)
|
public void ShowRewarded(Action _action)
|
||||||
{
|
{
|
||||||
if (_successfulFloor != null &&
|
if (_successfulFloor != null &&
|
||||||
_rvFloorAdControllers.ContainsKey(_successfulFloor.id) &&
|
_rvFloorAdControllers.ContainsKey(_successfulFloor.id) &&
|
||||||
_rvFloorAdControllers[_successfulFloor.id] != null)
|
_rvFloorAdControllers[_successfulFloor.id] != null)
|
||||||
|
@ -177,6 +217,53 @@ namespace WZ
|
||||||
_action?.Invoke();
|
_action?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取当前waterfall请求次数
|
||||||
|
/// </summary>
|
||||||
|
public int GetWaterfallRequestCount()
|
||||||
|
{
|
||||||
|
return _waterfallRequestCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取当前waterfall请求次数
|
||||||
|
/// </summary>
|
||||||
|
public int GetUniteIdRequestCount(string unitId)
|
||||||
|
{
|
||||||
|
return _unitIdRequestCounts.TryGetValue(unitId, out var time) ? time : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据floor.id获取其在排序后的楼层列表中的索引位置
|
||||||
|
/// </summary>
|
||||||
|
public int GetFloorIndex(string floorId)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < _sortedFloors.Count; i++)
|
||||||
|
{
|
||||||
|
if (_sortedFloors[i].id == floorId)
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1; // 未找到
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取当前Request ID
|
||||||
|
/// </summary>
|
||||||
|
public string GetCurrentRequestId()
|
||||||
|
{
|
||||||
|
return _currentRequestId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 生成唯一的Request ID
|
||||||
|
/// </summary>
|
||||||
|
private string GenerateRequestId()
|
||||||
|
{
|
||||||
|
return Guid.NewGuid().ToString("N");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace WZ
|
||||||
trackId,
|
trackId,
|
||||||
AdsType.Interstitial,
|
AdsType.Interstitial,
|
||||||
Time.realtimeSinceStartup - KwaiFloorIvManager.Instance._ivStartLoadTime);
|
Time.realtimeSinceStartup - KwaiFloorIvManager.Instance._ivStartLoadTime);
|
||||||
_manager.OnFloorAdLoaded(_floor, _manager._ivFloorAdControllers[_floor.id]);
|
_manager.OnFloorAdLoaded(_floor, _manager._ivFloorAdControllers[_floor.id],KwaiAdsManager.Instance._interstitiaAdRevenue);
|
||||||
LoggerUtils.Debug("[kwai] floor inter ad load success: "+trackId+" with price: "+price);
|
LoggerUtils.Debug("[kwai] floor inter ad load success: "+trackId+" with price: "+price);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace WZ
|
||||||
trackId,
|
trackId,
|
||||||
AdsType.Rewarded,
|
AdsType.Rewarded,
|
||||||
Time.realtimeSinceStartup - KwaiFloorRvManager.Instance._rvStartLoadTime);
|
Time.realtimeSinceStartup - KwaiFloorRvManager.Instance._rvStartLoadTime);
|
||||||
_manager.OnFloorAdLoaded(_floor, _manager._rvFloorAdControllers[_floor.id]);
|
_manager.OnFloorAdLoaded(_floor, _manager._rvFloorAdControllers[_floor.id], KwaiAdsManager.Instance._rewardAdRevenue);
|
||||||
LoggerUtils.Debug("[kwai] floor reward ad load success: "+trackId+" with price: "+price);
|
LoggerUtils.Debug("[kwai] floor reward ad load success: "+trackId+" with price: "+price);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,23 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
AdsSDKManager.Instance.InitSDK(action);
|
AdsSDKManager.Instance.InitSDK(action);
|
||||||
EFSdkManager.Instance.Init();
|
EFSdkManager.Instance.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 买量用户回调
|
||||||
|
|
||||||
|
public Action<bool, string> OnUserSourceListener;
|
||||||
|
|
||||||
|
/// Adjust归因回调
|
||||||
|
/// <summary>
|
||||||
|
/// <param name="is organic user">是否为买量用户</param>
|
||||||
|
/// <param name="adNetwork">adjust 返回的network字段</param>
|
||||||
|
/// </summary>
|
||||||
|
public void SetUserSourceListener(Action<bool, string> _action)
|
||||||
|
{
|
||||||
|
OnUserSourceListener = _action;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region ad
|
#region ad
|
||||||
|
|
||||||
|
@ -49,15 +65,15 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool IsRewardedAdReady()
|
public bool IsRewardedAdReady()
|
||||||
{
|
{
|
||||||
return AdsSDKManager.Instance.IsRewardAdReady();;
|
return AdsSDKManager.Instance.IsRewardAdReady(); ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 展示激励广告
|
/// 展示激励广告
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="position"></param>
|
/// <param name="position"></param>
|
||||||
/// <param name="callback"></param>
|
/// <param name="callback"></param>
|
||||||
public void ShowRewardAd(string position, Action<bool,double> callback = null)
|
public void ShowRewardAd(string position, Action<bool, double> callback = null)
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Rewarded, position);
|
AdsActionEvents.TrackAdPosition(AdsType.Rewarded, position);
|
||||||
bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady();
|
bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady();
|
||||||
|
@ -83,8 +99,8 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
callback?.Invoke(false, 0);
|
callback?.Invoke(false, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否已缓存插屏
|
/// 是否已缓存插屏
|
||||||
|
@ -93,7 +109,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
{
|
{
|
||||||
return AdsSDKManager.Instance.IsInterstitialReady();
|
return AdsSDKManager.Instance.IsInterstitialReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 展示插屏广告
|
/// 展示插屏广告
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -122,7 +138,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdFailToShow(AdsType.Interstitial, position, AdsShowFailType.NoFill);
|
AdsActionEvents.TrackAdFailToShow(AdsType.Interstitial, position, AdsShowFailType.NoFill);
|
||||||
callback?.Invoke(-1);
|
callback?.Invoke(-1);
|
||||||
}
|
}
|
||||||
|
@ -143,7 +159,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdFailToShow(AdsType.Interstitial, position, AdsShowFailType.NoFill);
|
AdsActionEvents.TrackAdFailToShow(AdsType.Interstitial, position, AdsShowFailType.NoFill);
|
||||||
callback?.Invoke(-1);
|
callback?.Invoke(-1);
|
||||||
}
|
}
|
||||||
|
@ -154,7 +170,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
callback?.Invoke(-1);
|
callback?.Invoke(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowBanner()
|
public void ShowBanner()
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Banner, "");
|
AdsActionEvents.TrackAdPosition(AdsType.Banner, "");
|
||||||
|
@ -163,12 +179,12 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
AdsSDKManager.Instance.ShowBanner();
|
AdsSDKManager.Instance.ShowBanner();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdFailToShow(AdsType.Banner, "", AdsShowFailType.NoFill);
|
AdsActionEvents.TrackAdFailToShow(AdsType.Banner, "", AdsShowFailType.NoFill);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void HideBanner()
|
public void HideBanner()
|
||||||
{
|
{
|
||||||
AdsSDKManager.Instance.HideBanner();
|
AdsSDKManager.Instance.HideBanner();
|
||||||
|
@ -179,7 +195,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
var adUnitId = StaticValue.AdmobFullNativeId;
|
var adUnitId = StaticValue.AdmobFullNativeId;
|
||||||
return AdsSDKManager.Instance.IsNativeAdReady(adUnitId);
|
return AdsSDKManager.Instance.IsNativeAdReady(adUnitId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowFullNative(RectTransform rectTransform, Camera pCom = null, string position = "")
|
public void ShowFullNative(RectTransform rectTransform, Camera pCom = null, string position = "")
|
||||||
{
|
{
|
||||||
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
AdsActionEvents.TrackAdPosition(AdsType.Native, position);
|
||||||
|
@ -188,18 +204,18 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var adUnitId = StaticValue.AdmobFullNativeId;
|
var adUnitId = StaticValue.AdmobFullNativeId;
|
||||||
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
||||||
{
|
{
|
||||||
TemplateId = NativeTemplateId.Medium,
|
TemplateId = NativeTemplateId.Medium,
|
||||||
MainBackgroundColor = Color.white
|
MainBackgroundColor = Color.white
|
||||||
}, rectTransform, pCom);
|
}, rectTransform, pCom);
|
||||||
|
|
||||||
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取全屏Native广告价值
|
/// 获取全屏Native广告价值
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -234,14 +250,14 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var adUnitId = StaticValue.AdmobNativeId;
|
var adUnitId = StaticValue.AdmobNativeId;
|
||||||
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
||||||
{
|
{
|
||||||
TemplateId = NativeTemplateId.Small,
|
TemplateId = NativeTemplateId.Small,
|
||||||
MainBackgroundColor = Color.white
|
MainBackgroundColor = Color.white
|
||||||
}, rectTransform, pCom);
|
}, rectTransform, pCom);
|
||||||
|
|
||||||
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +266,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
var adUnitId = StaticValue.AdmobNativeId;
|
var adUnitId = StaticValue.AdmobNativeId;
|
||||||
AdsSDKManager.Instance.RemoveNativeAd(adUnitId);
|
AdsSDKManager.Instance.RemoveNativeAd(adUnitId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsSmallNativeReady()
|
public bool IsSmallNativeReady()
|
||||||
{
|
{
|
||||||
var adUnitId = StaticValue.AdmobSmallNativeId;
|
var adUnitId = StaticValue.AdmobSmallNativeId;
|
||||||
|
@ -265,14 +281,14 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var adUnitId = StaticValue.AdmobSmallNativeId;
|
var adUnitId = StaticValue.AdmobSmallNativeId;
|
||||||
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
||||||
{
|
{
|
||||||
TemplateId = NativeTemplateId.Small,
|
TemplateId = NativeTemplateId.Small,
|
||||||
MainBackgroundColor = Color.white
|
MainBackgroundColor = Color.white
|
||||||
}, rectTransform, pCom);
|
}, rectTransform, pCom);
|
||||||
|
|
||||||
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +297,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
var adUnitId = StaticValue.AdmobSmallNativeId;
|
var adUnitId = StaticValue.AdmobSmallNativeId;
|
||||||
AdsSDKManager.Instance.RemoveNativeAd(adUnitId);
|
AdsSDKManager.Instance.RemoveNativeAd(adUnitId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsMinddleNativeReady()
|
public bool IsMinddleNativeReady()
|
||||||
{
|
{
|
||||||
var adUnitId = StaticValue.AdmobMinddleNativeId;
|
var adUnitId = StaticValue.AdmobMinddleNativeId;
|
||||||
|
@ -296,14 +312,14 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
AdsActionEvents.TrackAdFailToShow(AdsType.Native, position, AdsShowFailType.NoFill);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var adUnitId = StaticValue.AdmobMinddleNativeId;
|
var adUnitId = StaticValue.AdmobMinddleNativeId;
|
||||||
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
|
||||||
{
|
{
|
||||||
TemplateId = NativeTemplateId.Small,
|
TemplateId = NativeTemplateId.Small,
|
||||||
MainBackgroundColor = Color.white
|
MainBackgroundColor = Color.white
|
||||||
}, rectTransform, pCom);
|
}, rectTransform, pCom);
|
||||||
|
|
||||||
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
AdsSDKManager.Instance.ShowNativeAd(position, adUnitId, nativeAdPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +348,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
{
|
{
|
||||||
[key1] = value1
|
[key1] = value1
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LogEvent(string eventName, Dictionary<string, object> extraInfo)
|
public void LogEvent(string eventName, Dictionary<string, object> extraInfo)
|
||||||
|
@ -341,7 +357,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
FireBaseAnalyticsManager.Instance.LogEvent(eventName, extraInfo);
|
FireBaseAnalyticsManager.Instance.LogEvent(eventName, extraInfo);
|
||||||
AdjustTrackEvent.Instance.TrackEventName(eventName, extraInfo);
|
AdjustTrackEvent.Instance.TrackEventName(eventName, extraInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 公共事件属性
|
/// 公共事件属性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -351,7 +367,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
ShuShuEvent.Instance.SetSuperProperties(args);
|
ShuShuEvent.Instance.SetSuperProperties(args);
|
||||||
FireBaseAnalyticsManager.Instance.SetSuperProperties(args);
|
FireBaseAnalyticsManager.Instance.SetSuperProperties(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户属性
|
/// 用户属性
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -363,7 +379,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 在线参数
|
#region 在线参数
|
||||||
|
|
||||||
public bool GetRemoteConfigBool(string key, bool defaultValue = false)
|
public bool GetRemoteConfigBool(string key, bool defaultValue = false)
|
||||||
|
@ -374,7 +390,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigBool(key, defaultValue);
|
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigBool(key, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetRemoteConfigInt(string key, int defaultValue = 0)
|
public int GetRemoteConfigInt(string key, int defaultValue = 0)
|
||||||
{
|
{
|
||||||
if (Application.isEditor)
|
if (Application.isEditor)
|
||||||
|
@ -383,7 +399,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigInt(key, defaultValue);
|
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigInt(key, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetRemoteConfigStr(string key, string defaultValue = "")
|
public string GetRemoteConfigStr(string key, string defaultValue = "")
|
||||||
{
|
{
|
||||||
if (Application.isEditor)
|
if (Application.isEditor)
|
||||||
|
@ -392,7 +408,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigString(key, defaultValue);
|
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigString(key, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public float GetRemoteConfigFloat(string key, float defaultValue = 0)
|
public float GetRemoteConfigFloat(string key, float defaultValue = 0)
|
||||||
{
|
{
|
||||||
if (Application.isEditor)
|
if (Application.isEditor)
|
||||||
|
@ -455,7 +471,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
|
|
||||||
public void CanGoback(Action<bool> canGobackAction)
|
public void CanGoback(Action<bool> canGobackAction)
|
||||||
{
|
{
|
||||||
EFSdk.get().CanGoback(canGobackAction);
|
EFSdk.get().CanGoback(canGobackAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -476,8 +492,8 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 设置推送开关, SDK默认关闭通知
|
/// 设置推送开关, SDK默认关闭通知
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -588,7 +604,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
int pageId = EFSdk.get().GetJumpPage();
|
int pageId = EFSdk.get().GetJumpPage();
|
||||||
return pageId;
|
return pageId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -614,7 +630,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 如果没有通知权限就尝试申请通知权限
|
// 如果没有通知权限就尝试申请通知权限
|
||||||
if(!HasNotifyPermission())
|
if (!HasNotifyPermission())
|
||||||
{
|
{
|
||||||
EFSdk.get().ReqNotifyPermission(isgGranted =>
|
EFSdk.get().ReqNotifyPermission(isgGranted =>
|
||||||
{
|
{
|
||||||
|
@ -654,7 +670,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
EFSdk.get().UnSubscribeUnclaimed01();
|
EFSdk.get().UnSubscribeUnclaimed01();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
// 满足条件: 在排队中 且 当日R$1 未领取 的买量用户, 调用这个方法
|
// 满足条件: 在排队中 且 当日R$1 未领取 的买量用户, 调用这个方法
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -703,7 +719,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
}
|
}
|
||||||
EFSdk.get().UnSubscribeToTopic(topic);
|
EFSdk.get().UnSubscribeToTopic(topic);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 可覆盖广告的Toast
|
/// 可覆盖广告的Toast
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -722,9 +738,9 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void AutoLocalPush(bool isOpen)
|
public void AutoLocalPush(bool isOpen)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Webview展示成功后回调
|
/// Webview展示成功后回调
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -733,7 +749,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
{
|
{
|
||||||
EFSdkManager.Instance.SetWebviewShowSuccessAction(action);
|
EFSdkManager.Instance.SetWebviewShowSuccessAction(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -745,7 +761,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
return AdjustNetwork.Instance.InOrganic();
|
return AdjustNetwork.Instance.InOrganic();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetGaid()
|
public string GetGaid()
|
||||||
{
|
{
|
||||||
if (Application.isEditor)
|
if (Application.isEditor)
|
||||||
{
|
{
|
||||||
|
@ -829,7 +845,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
{
|
{
|
||||||
return "GetSSDistinctId";
|
return "GetSSDistinctId";
|
||||||
}
|
}
|
||||||
LoggerUtils.Debug("GetSSDistinctId:"+TDAnalytics.GetDistinctId());
|
LoggerUtils.Debug("GetSSDistinctId:" + TDAnalytics.GetDistinctId());
|
||||||
return TDAnalytics.GetDistinctId();
|
return TDAnalytics.GetDistinctId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -844,4 +860,9 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
LoggerUtils.Debug("GetSSDistinctId:" + JsonMapper.ToJson(superProperties));
|
LoggerUtils.Debug("GetSSDistinctId:" + JsonMapper.ToJson(superProperties));
|
||||||
return superProperties == null ? "" : superProperties.ToString();
|
return superProperties == null ? "" : superProperties.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OpenPrivacy()
|
||||||
|
{
|
||||||
|
Application.OpenURL(StaticValue.PrivacyUrl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,12 @@ public class Test : MonoBehaviour
|
||||||
{
|
{
|
||||||
small = gameObject.transform.Find("NativeAd-small").GetComponent<RectTransform>();
|
small = gameObject.transform.Find("NativeAd-small").GetComponent<RectTransform>();
|
||||||
medium = gameObject.transform.Find("NativeAd-medium").GetComponent<RectTransform>();
|
medium = gameObject.transform.Find("NativeAd-medium").GetComponent<RectTransform>();
|
||||||
|
RushSDKManager.Instance.SetUserSourceListener((bool success, string source) =>
|
||||||
|
{
|
||||||
|
LoggerUtils.Debug("adjust callback: "+success+" adnetwork:"+source);
|
||||||
|
});
|
||||||
RushSDKManager.Instance.InitializeSdk(null, true);
|
RushSDKManager.Instance.InitializeSdk(null, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnShowAd()
|
public void OnShowAd()
|
||||||
|
|
Loading…
Reference in New Issue