Merge branch 'main' of http://v4.9ms.co:7777/yufeng/SDK_UnityMoney
This commit is contained in:
commit
c89fe09c1a
Binary file not shown.
|
@ -24,6 +24,10 @@ public class AdjustManager : D_MonoSingleton<AdjustManager>
|
||||||
//开始计时
|
//开始计时
|
||||||
startTime = TimeUtils.GetLocalTimestamp();
|
startTime = TimeUtils.GetLocalTimestamp();
|
||||||
Adjust.AddGlobalCallbackParameter("ta_distinct_id", TDAnalytics.GetDistinctId());
|
Adjust.AddGlobalCallbackParameter("ta_distinct_id", TDAnalytics.GetDistinctId());
|
||||||
|
|
||||||
|
Adjust.AddGlobalCallbackParameter("rush_version", RushSDKManager.GetSDKVersion());
|
||||||
|
Adjust.AddGlobalPartnerParameter("rush_version", RushSDKManager.GetSDKVersion());
|
||||||
|
|
||||||
AdjustConfig config = new AdjustConfig(StaticValue.AdjustToken, environment);
|
AdjustConfig config = new AdjustConfig(StaticValue.AdjustToken, environment);
|
||||||
|
|
||||||
// 设置归因变更回调函数
|
// 设置归因变更回调函数
|
||||||
|
|
|
@ -63,11 +63,15 @@ namespace WZ
|
||||||
_adStartLoadTimes[adUnitId] = Time.realtimeSinceStartup;
|
_adStartLoadTimes[adUnitId] = Time.realtimeSinceStartup;
|
||||||
LoggerUtils.Debug($"[Admob] Native Ad unit {adUnitId} load end, timingRefresh {timingRefresh}. {ad} error {error}");
|
LoggerUtils.Debug($"[Admob] Native Ad unit {adUnitId} load end, timingRefresh {timingRefresh}. {ad} error {error}");
|
||||||
if (error != null || ad == null)
|
if (error != null || ad == null)
|
||||||
|
{
|
||||||
|
if (!timingRefresh)
|
||||||
{
|
{
|
||||||
if (!_retryCounters.TryAdd(adUnitId, 0))
|
if (!_retryCounters.TryAdd(adUnitId, 0))
|
||||||
{
|
{
|
||||||
_retryCounters[adUnitId]++;
|
_retryCounters[adUnitId]++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var adSource = "";
|
var adSource = "";
|
||||||
if (ad != null)
|
if (ad != null)
|
||||||
|
@ -89,8 +93,21 @@ namespace WZ
|
||||||
Time.realtimeSinceStartup - _adStartLoadTimes[adUnitId],
|
Time.realtimeSinceStartup - _adStartLoadTimes[adUnitId],
|
||||||
reason);
|
reason);
|
||||||
|
|
||||||
|
// 定时任务的刷新,由定时任务自己去刷新
|
||||||
|
if (timingRefresh)
|
||||||
|
{
|
||||||
|
if (!showingNativeAds.ContainsKey(adUnitId))
|
||||||
|
{
|
||||||
|
LoggerUtils.Debug($"[Admob] Native Ad unit {adUnitId}, 已经隐藏了,失败了也不需要在重新load了");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TimingRefresh(adUnitId);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var retryDelay = Math.Pow(2, Math.Min(6, _retryCounters[adUnitId]));
|
var retryDelay = Math.Pow(2, Math.Min(6, _retryCounters[adUnitId]));
|
||||||
TimerUtils.Instance.DelayExecute((float)retryDelay, () => { LoadAd(adUnitId, timingRefresh); });
|
TimerUtils.Instance.DelayExecute((float)retryDelay, () => { LoadAd(adUnitId); });
|
||||||
LoggerUtils.Error($"[Admob] Native Ad unit {adUnitId}, timingRefresh {timingRefresh} ad failed to load an ad with error : " + error + " \n retryDelay :" + retryDelay);
|
LoggerUtils.Error($"[Admob] Native Ad unit {adUnitId}, timingRefresh {timingRefresh} ad failed to load an ad with error : " + error + " \n retryDelay :" + retryDelay);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -155,12 +172,18 @@ namespace WZ
|
||||||
{
|
{
|
||||||
if (showingNativeAds.TryGetValue(adUnitId, out var showing))
|
if (showingNativeAds.TryGetValue(adUnitId, out var showing))
|
||||||
{
|
{
|
||||||
|
var showingNativeOverlayAd = showing.NativeOverlayAd;
|
||||||
|
if (showingNativeOverlayAd != tempAd)
|
||||||
|
{
|
||||||
|
LoggerUtils.Error("[Admob] Native ad Error!!!! showing.NativeOverlayAd != tempAd");
|
||||||
|
}
|
||||||
|
|
||||||
LoggerUtils.Warning("[Admob] Native ad timing refresh , show ad");
|
LoggerUtils.Warning("[Admob] Native ad timing refresh , show ad");
|
||||||
ShowAd(showing.Position, adUnitId, tempAd);
|
ShowAd(showing.Position, adUnitId, tempAd, showingNativeOverlayAd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LoggerUtils.Warning($"[Admob] Native ad timing refresh , show fail , showing native ads not ad unit id , {adUnitId}");
|
LoggerUtils.Warning($"[Admob] Native ad timing refresh , show fail , showing native ads not ad unit id , {adUnitId} , 广告已经隐藏了,刷新成功,不需要再去显示出来");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -180,7 +203,7 @@ namespace WZ
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示特定广告位的广告
|
// 显示特定广告位的广告
|
||||||
public void ShowAd(NativeAdPosition position, string adUnitId, NativeOverlayAd lastAd = null)
|
public void ShowAd(NativeAdPosition position, string adUnitId, NativeOverlayAd lastAd = null, NativeOverlayAd lastShowAd = null)
|
||||||
{
|
{
|
||||||
if (!AdmobAdsManager.Instance.FindAdsID(AdsType.Native, adUnitId))
|
if (!AdmobAdsManager.Instance.FindAdsID(AdsType.Native, adUnitId))
|
||||||
{
|
{
|
||||||
|
@ -213,6 +236,7 @@ namespace WZ
|
||||||
showingNativeAds[adUnitId] = new ShowNativePosition(ad, position);
|
showingNativeAds[adUnitId] = new ShowNativePosition(ad, position);
|
||||||
ad.Show();
|
ad.Show();
|
||||||
lastAd?.Hide();
|
lastAd?.Hide();
|
||||||
|
lastShowAd?.Hide();
|
||||||
TimingRefresh(adUnitId);
|
TimingRefresh(adUnitId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,6 +143,7 @@ namespace WZ
|
||||||
private List<Parameter> GetSuperProperties()
|
private List<Parameter> GetSuperProperties()
|
||||||
{
|
{
|
||||||
List<Parameter> parameterList = new List<Parameter>();
|
List<Parameter> parameterList = new List<Parameter>();
|
||||||
|
parameterList.Add(new Parameter("rush_version", RushSDKManager.GetSDKVersion()));
|
||||||
if (superProperties != null)
|
if (superProperties != null)
|
||||||
{
|
{
|
||||||
foreach (var superProperty in superProperties)
|
foreach (var superProperty in superProperties)
|
||||||
|
|
|
@ -17,6 +17,11 @@ using WZ;
|
||||||
|
|
||||||
public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
public class RushSDKManager : D_MonoSingleton<RushSDKManager>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static string GetSDKVersion()
|
||||||
|
{
|
||||||
|
return "1.0.3.0";
|
||||||
|
}
|
||||||
protected override void Initialized()
|
protected override void Initialized()
|
||||||
{
|
{
|
||||||
base.Initialized();
|
base.Initialized();
|
||||||
|
|
|
@ -16,6 +16,10 @@ namespace WZ
|
||||||
//开启自动采集事件
|
//开启自动采集事件
|
||||||
TDAnalytics.EnableAutoTrack(TDAutoTrackEventType.AppInstall | TDAutoTrackEventType.AppStart | TDAutoTrackEventType.AppEnd);
|
TDAnalytics.EnableAutoTrack(TDAutoTrackEventType.AppInstall | TDAutoTrackEventType.AppStart | TDAutoTrackEventType.AppEnd);
|
||||||
|
|
||||||
|
TDAnalytics.SetSuperProperties(new Dictionary<string, object>
|
||||||
|
{
|
||||||
|
["rush_version"] = RushSDKManager.GetSDKVersion()
|
||||||
|
});
|
||||||
ShuShuEvent.Instance.UserSet(new Dictionary<string, object>
|
ShuShuEvent.Instance.UserSet(new Dictionary<string, object>
|
||||||
{
|
{
|
||||||
{ "register_timestamp", DateTimeOffset.UtcNow.ToUnixTimeSeconds() + (8 * 3600)},
|
{ "register_timestamp", DateTimeOffset.UtcNow.ToUnixTimeSeconds() + (8 * 3600)},
|
||||||
|
|
|
@ -1,14 +1,34 @@
|
||||||
# Version 1.0.1 2025.9.16
|
# Version 1.0.3.0 2025.9.18
|
||||||
## Bugs
|
|
||||||
- None
|
|
||||||
## Known issues
|
|
||||||
- None
|
|
||||||
## Changelog
|
|
||||||
- 新增Kwai广告位竞价逻辑
|
|
||||||
- 新增跳转谷歌商店接口
|
|
||||||
- 新增adjust用户来源回调
|
|
||||||
- 新增隐私协议接口
|
|
||||||
- 优化native样式
|
|
||||||
- 新增native自刷新功能
|
|
||||||
- 支持Admob可折叠banner
|
|
||||||
|
|
||||||
|
## Bugs
|
||||||
|
|
||||||
|
- 修复 Native 自动刷新隐藏失败的问题
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
- Native 支持背景颜色设置
|
||||||
|
- 全屏 Native 样式修改
|
||||||
|
|
||||||
|
# Version 1.0.1 2025.9.16
|
||||||
|
|
||||||
|
## Bugs
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## Known issues
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
- 新增 Kwai 广告位竞价逻辑
|
||||||
|
- 新增跳转谷歌商店接口
|
||||||
|
- 新增 adjust 用户来源回调
|
||||||
|
- 新增隐私协议接口
|
||||||
|
- 优化 native 样式
|
||||||
|
- 新增 native 自刷新功能
|
||||||
|
- 支持 Admob 可折叠 banner
|
||||||
|
|
Loading…
Reference in New Issue