Commit 881cbf7e authored by 王雪伟's avatar 王雪伟

Unity广告SDK 1.0.0

parent 0677490a
......@@ -46,14 +46,17 @@ public class AdManager
private string AdConfigUrl = "v1/fetch/adAppIds";
private string AdLoadUrl = "v4/ads";
private bool IsFirstLoadRewardAd = false;
private bool IsFirstLoadFSAd = false;
public void InitAd()
{
IsFirstLoadRewardAd = true;
IsFirstLoadFSAd = true;
//paras.Clear();
//paras.Add("pkg", "com.ym.xynt");
//获取广告配置
Dictionary<string, string> paras = new Dictionary<string, string>();
HttpTool.Instance._Get(AdConfigUrl, paras, new Action<List<AdIdConfig>>((AdConfigList) =>
Dictionary<string, object> paras = new Dictionary<string, object>();
HttpTool.Instance._GetAD(AdConfigUrl, paras, new Action<List<AdIdConfig>>((AdConfigList) =>
{
foreach (AdIdConfig id in AdConfigList)
{
......@@ -75,7 +78,7 @@ public class AdManager
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "AdInit 请求失败" + errMsg);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, code+"AdInit 请求失败" + errMsg);
}));
}
......@@ -91,33 +94,70 @@ public class AdManager
listener.onError("没有初始化");
return;
}
Dictionary<string, string> paras = new Dictionary<string, string>();
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("slotName", "splash");
HttpTool.Instance._Get(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
HttpTool.Instance._GetAD(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash 请求成功");
if (AdConfigList != null && AdConfigList.Count > 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash 开始加载");
mLoadSplashPlatform(AdConfigList[0], listener, new Action<bool>((bl) =>
//Splash数据
List<AdEntity> bannerAdList = new List<AdEntity>();
bannerAdList.Add(AdConfigList[0]);
if (AdConfigList[0].backups != null && AdConfigList[0].backups.Count > 0)
{
bannerAdList.AddRange(AdConfigList[0].backups);
}
//加载Splash广告
mLoadSplashAd("splash", listener, bannerAdList);
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash 请求失败" + errMsg);
}));
}
/// <summary>
/// 根据广告List开始加载Splash
/// </summary>
private Action<bool> SplashAdCallBack;
private void mLoadSplashAd(string sloatName, ZXADSplashListener listener, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash没有广告数据");
return;
}
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
//移除第一条数据
totalEntityList.RemoveAt(0);
SplashAdCallBack = new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash 成功");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash成功 " + entity.adPlatform + " CodeID " + entity.codeId);
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash 失败");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadSplashPlatform(entity, listener,SplashAdCallBack);
}
}));
}
});
mLoadSplashPlatform(entity, listener,SplashAdCallBack);
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Splash 请求失败" + errMsg);
}));
}
/// <summary>
/// 分平台加载开屏广告
/// </summary>
......@@ -141,219 +181,552 @@ public class AdManager
//==================================================================Banner START================================================
/// <summary>
/// 缓存Banner广告
/// </summary>
public void LoadCacheBannerAd()
public void LoadCacheBannerAd(string slotName)
{
Dictionary<string, string> paras = new Dictionary<string, string>();
paras.Add("slotName", "splash");
HttpTool.Instance._Get(AdLoadUrl, paras, new Action<List<AdIdConfig>>((AdConfigList) =>
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("slotName", slotName);
HttpTool.Instance._GetAD(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Banner 请求成功");
if (AdConfigList != null && AdConfigList.Count > 0)
{
//Banner数据
List<AdEntity> bannerAdList = new List<AdEntity>();
bannerAdList.Add(AdConfigList[0]);
if (AdConfigList[0].backups != null && AdConfigList[0].backups.Count > 0)
{
bannerAdList.AddRange(AdConfigList[0].backups);
}
//加载Banner广告
mLoadBannerCacheAd(slotName, bannerAdList);
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Banner请求失败" + errMsg);
}));
}
}), new Action<string, string>((code, errMsg) =>
/// <summary>
/// 根据广告List开始加载Banner缓存
/// </summary>
private Action<bool> BannerAdCallBack;
private void mLoadBannerCacheAd(string sloatName, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Banner没有广告数据");
return;
}
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
}));
GDTBannerAdUtil.Instance.LoadCacheBannerAd(null, new Action<bool>((bl) =>
//移除第一条数据
totalEntityList.RemoveAt(0);
BannerAdCallBack = new Action<bool>((bl) =>
{
if (bl)
{
Debug.Log("GDT Banner 缓存成功");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Banner缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
//保存Banner缓存数据
ZXADConfig.Instance.SetAdCache(sloatName, entity, "");
}
else
{
Debug.Log("GDT Banner 缓存失败");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Banner缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadCacheBannerAdPlatform(entity, BannerAdCallBack);
}
}
});
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "开始缓存Banner");
mLoadCacheBannerAdPlatform(entity, BannerAdCallBack);
}
}));
//CSJBannerUtil.Instance.LoadCacheBannerAd(null, new Action<bool>((bl) =>
//{
// if (bl)
// {
// Debug.Log("GDT Banner 缓存成功");
// }
// else
// {
// Debug.Log("GDT Banner 缓存失败");
// }
//}));
private void mLoadCacheBannerAdPlatform(AdEntity entity, Action<bool> callback)
{
switch (entity.adPlatform)
{
case ZXADConfig.PLANTFORM_AD_TT:
//穿山甲Banner广告加载
CSJBannerUtil.Instance.LoadCacheBannerAd(entity, callback);
break;
case ZXADConfig.PLANTFORM_AD_GDT:
//广点通Banner广告加载
GDTBannerAdUtil.Instance.LoadCacheBannerAd(entity, callback);
break;
}
}
/// <summary>
/// show缓存的Banner
/// 展示缓存的Banner广告
/// </summary>
public void ShowCacheBannerAd()
public void ShowCacheBannerAd(string slotName)
{
AdEntity entity = ZXADConfig.Instance.GetAdCache(slotName, "");
if (entity != null)
{
ZXADConfig.Instance.RemoveAdCache(slotName, "");
mShowCacheBannerAdPlatform(entity, new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "展示Banner成功 " + entity.adPlatform + " CodeId" + entity.codeId);
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "展示Banner失败 " + entity.adPlatform + " CodeId" + entity.codeId);
}
}));
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "展示Banner失败 缓存的信息为null");
}
}
private void mShowCacheBannerAdPlatform(AdEntity entity, Action<bool> callback)
{
switch (entity.adPlatform)
{
GDTBannerAdUtil.Instance.ShowCacheBannerAd(null);
//CSJBannerUtil.Instance.ShowCacheBannerAd();
case ZXADConfig.PLANTFORM_AD_TT:
//穿山甲Banner广告加载
CSJBannerUtil.Instance.ShowCacheBannerAd(entity,callback);
break;
case ZXADConfig.PLANTFORM_AD_GDT:
//广点通Banner广告加载
GDTBannerAdUtil.Instance.ShowCacheBannerAd(entity, callback);
break;
}
}
//==================================================================Banner END================================================
//==================================================================大图START================================================
/// <summary>
/// 缓存大图广告
/// </summary>
public void LoadCacheFeedAd()
public void LoadCacheFeedAd(string slotName)
{
Dictionary<string, string> paras = new Dictionary<string, string>();
paras.Add("slotName", "bigimage");
HttpTool.Instance._Get(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("slotName", slotName);
HttpTool.Instance._GetAD(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Feed 请求成功");
if (AdConfigList != null && AdConfigList.Count > 0)
{
//插屏大图数据
List<AdEntity> feedAdList = new List<AdEntity>();
feedAdList.Add(AdConfigList[0]);
if (AdConfigList[0].backups != null && AdConfigList[0].backups.Count > 0)
{
feedAdList.AddRange(AdConfigList[0].backups);
}
//加载大图广告
mLoadFeedCacheAd(slotName, feedAdList);
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "Feed 请求失败" + errMsg);
}));
//CSJFeedUtil.Instance.LoadCacheFeedAd(null, new Action<bool>((bl) =>
//{
// if (bl)
// {
// Debug.Log("CSJ Feed 缓存成功");
// }
// else
// {
// Debug.Log("CSJ Feed 缓存失败");
// }
}
//}));
GDTFeedAdUtil.Instance.LoadCacheFeedAd(null, new Action<bool>((bl) =>
/// <summary>
/// 根据广告List开始加载插屏缓存
/// </summary>
private Action<bool> FeedAdCallBack;
private void mLoadFeedCacheAd(string sloatName, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "大图没有广告数据");
return;
}
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
//移除第一条数据
totalEntityList.RemoveAt(0);
FeedAdCallBack = new Action<bool>((bl) =>
{
if (bl)
{
Debug.Log("GDT Feed 缓存成功");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "大图缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
//保存插屏缓存数据
ZXADConfig.Instance.SetAdCache(sloatName, entity, "");
}
else
{
Debug.Log("GDT Feed 缓存失败");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "大图缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadCacheFeedAdPlatform(entity, FeedAdCallBack);
}
}
});
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "开始缓存大图");
mLoadCacheFeedAdPlatform(entity, FeedAdCallBack);
}
}));
private void mLoadCacheFeedAdPlatform(AdEntity entity, Action<bool> callback)
{
switch (entity.adPlatform)
{
case ZXADConfig.PLANTFORM_AD_TT:
//穿山甲插屏广告加载
CSJFeedUtil.Instance.LoadCacheFeedAd(entity, callback);
break;
case ZXADConfig.PLANTFORM_AD_GDT:
//广点通插屏广告加载
GDTFeedAdUtil.Instance.LoadCacheFeedAd(entity, callback);
break;
}
}
/// <summary>
/// 展示缓存的大图广告
/// </summary>
public void ShowCacheFeedAd()
public void ShowCacheFeedAd(string slotName)
{
AdEntity entity = ZXADConfig.Instance.GetAdCache(slotName, "");
if (entity != null)
{
CSJFeedUtil.Instance.ShowCacheFeedAd(null);
GDTFeedAdUtil.Instance.ShowCacheFeedAd(null);
ZXADConfig.Instance.RemoveAdCache(slotName, "");
mShowCacheFeedAdPlatform(entity, new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "展示大图成功 " + entity.adPlatform + " CodeId" + entity.codeId);
}
/// <summary>
/// 缓存插屏广告
/// </summary>
public void LoadCacheInterstitialAd()
else
{
Dictionary<string, string> paras = new Dictionary<string, string>();
paras.Add("slotName", "splash");
HttpTool.Instance._Get(AdLoadUrl, paras, new Action<List<AdIdConfig>>((AdConfigList) =>
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "展示大图失败 " + entity.adPlatform + " CodeId" + entity.codeId);
}
}));
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "展示大图失败 缓存的信息为null");
}
}
private void mShowCacheFeedAdPlatform(AdEntity entity, Action<bool> callback)
{
switch (entity.adPlatform)
{
case ZXADConfig.PLANTFORM_AD_TT:
//穿山甲大图广告加载
CSJFeedUtil.Instance.ShowCacheFeedAd(entity,callback);
break;
case ZXADConfig.PLANTFORM_AD_GDT:
//广点通大图广告加载
GDTFeedAdUtil.Instance.ShowCacheFeedAd(entity, callback);
break;
}
}
//==================================================================大图End================================================
//==================================================================插屏START================================================
/// <summary>
/// 缓存插屏广告
/// </summary>
public void LoadCacheInterstitialAd(string slotName)
{
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("slotName", slotName);
HttpTool.Instance._GetAD(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "插屏广告请求成功");
if (AdConfigList != null && AdConfigList.Count > 0)
{
//插屏广告数据
List<AdEntity> interAdList = new List<AdEntity>();
interAdList.Add(AdConfigList[0]);
if (AdConfigList[0].backups != null && AdConfigList[0].backups.Count > 0)
{
interAdList.AddRange(AdConfigList[0].backups);
}
//加载插屏广告
mLoadInterstitialCacheAd(slotName, interAdList);
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "插屏请求失败" + errMsg);
}));
//CSJInterstitialUtil.Instance.LoadCacheInterstitialAd(null, new Action<bool>((bl) =>
//{
// if (bl)
// {
// Debug.Log("CSJ 插屏 缓存成功");
// }
// else
// {
// Debug.Log("CSJ 插屏 缓存失败");
// }
}
//}));
GDTInterstitialAdUtil.Instance.LoadCacheInterstitialAd(null, new Action<bool>((bl) =>
/// <summary>
/// 根据广告List开始加载插屏缓存
/// </summary>
private Action<bool> InterstitialAdCallBack;
private void mLoadInterstitialCacheAd(string sloatName, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "插屏没有广告数据");
return;
}
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
//移除第一条数据
totalEntityList.RemoveAt(0);
InterstitialAdCallBack = new Action<bool>((bl) =>
{
if (bl)
{
Debug.Log("GDT 插屏 缓存成功");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "插屏缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
//保存插屏缓存数据
ZXADConfig.Instance.SetAdCache(sloatName, entity, "");
}
else
{
Debug.Log("GDT 插屏 缓存失败");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "插屏缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadInterstitialAdPlatform(entity, InterstitialAdCallBack);
}
}
});
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "开始缓存插屏");
mLoadInterstitialAdPlatform(entity, InterstitialAdCallBack);
}
}));
private void mLoadInterstitialAdPlatform(AdEntity entity,Action<bool> callback)
{
switch (entity.adPlatform)
{
case ZXADConfig.PLANTFORM_AD_TT:
//穿山甲插屏广告加载
CSJInterstitialUtil.Instance.LoadCacheInterstitialAd(entity, callback);
break;
case ZXADConfig.PLANTFORM_AD_GDT:
//广点通插屏广告加载
GDTInterstitialAdUtil.Instance.LoadCacheInterstitialAd(entity, callback);
break;
}
}
/// <summary>
/// 播放缓存的插屏广告
/// </summary>
public void PlayCacheInterstitialAd()
public void PlayCacheInterstitialAd(string slotName)
{
AdEntity entity = ZXADConfig.Instance.GetAdCache(slotName,"");
if (entity != null)
{
ZXADConfig.Instance.RemoveAdCache(slotName, "");
mPlayCacheInterstitialAdPlatform(entity, new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "播放全屏视频成功 " + entity.adPlatform + " CodeId" + entity.codeId);
}
else
{
//CSJInterstitialUtil.Instance.PlayCacheInterstitialAd(null);
GDTInterstitialAdUtil.Instance.PlayCacheInterstitialAd(null);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "播放全屏视频失败 " + entity.adPlatform + " CodeId" + entity.codeId);
}
}));
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "播放全屏视频失败 缓存的信息为null");
}
}
private void mPlayCacheInterstitialAdPlatform(AdEntity entity,Action<bool> callback)
{
switch (entity.adPlatform)
{
case ZXADConfig.PLANTFORM_AD_TT:
//穿山甲插屏广告加载
CSJInterstitialUtil.Instance.PlayCacheInterstitialAd(entity,callback);
break;
case ZXADConfig.PLANTFORM_AD_GDT:
//广点通插屏广告加载
GDTInterstitialAdUtil.Instance.PlayCacheInterstitialAd(entity,callback);
break;
}
}
//==================================================================插屏END================================================
//==================================================================全屏视频Start================================================
/// <summary>
/// 缓存全屏视频广告
/// </summary>
public void LoadCacheFSVideoAd(string slotName)
{
Dictionary<string, string> paras = new Dictionary<string, string>();
paras.Add("slotName", "fullvideo");
HttpTool.Instance._Get(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("slotName", slotName);
HttpTool.Instance._GetAD(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频请求成功");
if (AdConfigList != null && AdConfigList.Count > 0)
{
List<AdEntity> rewardAdList = new List<AdEntity>();
rewardAdList.Add(AdConfigList[0]);
//A组数据
List<AdEntity> fsAdList_A = new List<AdEntity>();
fsAdList_A.Add(AdConfigList[0]);
if (AdConfigList[0].backups != null && AdConfigList[0].backups.Count > 0)
{
rewardAdList.AddRange(AdConfigList[0].backups);
fsAdList_A.AddRange(AdConfigList[0].backups);
}
mLoadFSVideoCacheAd_A(slotName, rewardAdList);
//A组没有缓存数据
if (ZXADConfig.Instance.GetAdCache(slotName, "A") == null)
{
mLoadFSVideoCacheAd_A(slotName, fsAdList_A);
}
//B组数据
if (AdConfigList[0].bgroup != null)
{
List<AdEntity> fsAdList_B = new List<AdEntity>();
fsAdList_B.Add(AdConfigList[0].bgroup);
if (AdConfigList[0].bgroup.backups != null && AdConfigList[0].bgroup.backups.Count > 0)
{
fsAdList_B.AddRange(AdConfigList[0].bgroup.backups);
}
//B组没有缓存数据
if (ZXADConfig.Instance.GetAdCache(slotName, "B") == null)
{
mLoadFSVideoCacheAd_B(slotName, fsAdList_B);
}
}
else
{
Debug.unityLogger.Log("B组数据为NULL");
}
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频请求失败");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频请求失败"+errMsg);
}));
}
/// <summary>
/// 根据广告List开始加载全屏视频缓存
/// 根据广告List开始加载全屏视频缓存A
/// </summary>
private Action<bool> FSVideoAdCallBack;
private Action<bool> FSVideoAdCallBackA;
private void mLoadFSVideoCacheAd_A(string sloatName, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频A组没有数据");
return;
}
if (IsFirstLoadFSAd)
{
//第一次预加载 A组进行逆序加载
IsFirstLoadFSAd = false;
adList.Reverse();
}
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
//移除第一条数据
totalEntityList.RemoveAt(0);
FSVideoAdCallBack = new Action<bool>((bl) =>
FSVideoAdCallBackA = new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频A组缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
ZXADConfig.Instance.SetAdCache(sloatName, entity, "A");
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频A组缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadFSVideoAdPlatform(entity, FSVideoAdCallBack);
mLoadFSVideoAdPlatform(entity, FSVideoAdCallBackA);
}
}
});
mLoadFSVideoAdPlatform(entity, FSVideoAdCallBack);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "A开始缓存全屏视频");
mLoadFSVideoAdPlatform(entity, FSVideoAdCallBackA);
}
/// <summary>
/// 根据广告List开始加载全屏视频缓存B
/// </summary>
private Action<bool> FSVideoAdCallBackB;
private void mLoadFSVideoCacheAd_B(string sloatName, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频B组没有数据");
return;
}
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
//移除第一条数据
totalEntityList.RemoveAt(0);
FSVideoAdCallBackB = new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频B组缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
ZXADConfig.Instance.SetAdCache(sloatName, entity, "B");
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频B组缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadFSVideoAdPlatform(entity, FSVideoAdCallBackB);
}
}
});
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "B开始缓存全屏视频");
mLoadFSVideoAdPlatform(entity, FSVideoAdCallBackB);
}
/// <summary>
/// 全屏广告根据广告信息选择加载广告的平台
/// </summary>
......@@ -382,12 +755,42 @@ public class AdManager
public void PlayCacheFSVideoAd(string slotName, string actionName, ZXADFullScreenVideoListener listener)
{
AdEntity entity = ZXADConfig.Instance.GetAdCache(slotName, "A");
//AdEntity entity = ZXADConfig.Instance.GetAdCache(slotName,"B");
AdEntity entity = null;
AdEntity entityA = ZXADConfig.Instance.GetAdCache(slotName, "A");
AdEntity entityB = ZXADConfig.Instance.GetAdCache(slotName, "B");
if (entityA != null && entityB != null)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频 A组 B组 都有缓存数据");
if (entityA.codePrice > entityB.codePrice)
{
entity = entityA;
ZXADConfig.Instance.RemoveAdCache(slotName, "A");
}
else
{
entity = entityB;
ZXADConfig.Instance.RemoveAdCache(slotName, "B");
}
}
else if (entityA != null)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频 A组 有缓存数据");
entity = entityA;
ZXADConfig.Instance.RemoveAdCache(slotName, "A");
}
else if (entityB != null)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "全屏视频 B组 有缓存数据");
entity = entityB;
ZXADConfig.Instance.RemoveAdCache(slotName, "B");
}
if (entity != null)
{
mPlayCacheFSVodeoAdPlatform(entity, listener, new Action<bool>((bl) => {
mPlayCacheFSVodeoAdPlatform(entity, listener, new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "播放全屏视频成功 " + entity.adPlatform + " CodeId" + entity.codeId);
......@@ -422,12 +825,12 @@ public class AdManager
//==================================================================全屏视频END================================================
//==================================================================激励视频Start================================================
/// <summary>
......@@ -435,57 +838,136 @@ public class AdManager
/// </summary>
public void LoadCacheRewardVideoAd(string slotName)
{
Dictionary<string, string> paras = new Dictionary<string, string>();
paras.Add("slotName", "video");
HttpTool.Instance._Get(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("slotName", slotName);
HttpTool.Instance._GetAD(AdLoadUrl, paras, new Action<List<AdEntity>>((AdConfigList) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频请求成功");
if (AdConfigList != null && AdConfigList.Count > 0)
{
List<AdEntity> rewardAdList = new List<AdEntity>();
rewardAdList.Add(AdConfigList[0]);
//A组数据
List<AdEntity> rewardAdList_A = new List<AdEntity>();
rewardAdList_A.Add(AdConfigList[0]);
if (AdConfigList[0].backups != null && AdConfigList[0].backups.Count > 0)
{
rewardAdList.AddRange(AdConfigList[0].backups);
rewardAdList_A.AddRange(AdConfigList[0].backups);
}
//A组没有缓存数据
if (ZXADConfig.Instance.GetAdCache(slotName, "A") == null)
{
mLoadRewardVideoCacheAd_A(slotName, rewardAdList_A);
}
//B组数据
if (AdConfigList[0].bgroup != null)
{
List<AdEntity> rewardAdList_B = new List<AdEntity>();
rewardAdList_B.Add(AdConfigList[0].bgroup);
if (AdConfigList[0].bgroup.backups != null && AdConfigList[0].bgroup.backups.Count > 0)
{
rewardAdList_B.AddRange(AdConfigList[0].bgroup.backups);
}
//B组没有缓存数据
if (ZXADConfig.Instance.GetAdCache(slotName, "B") == null)
{
mLoadRewardVideoCacheAd_B(slotName, rewardAdList_B);
}
}
else
{
Debug.unityLogger.Log("B组数据为NULL");
}
mLoadRewardVideoCacheAd_A(slotName, rewardAdList);
}
}), new Action<string, string>((code, errMsg) =>
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频请求失败");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频请求失败" + errMsg);
}));
}
/// <summary>
/// 根据广告List开始加载激励视频缓存
/// 根据广告List开始加载激励视频缓存A组
/// </summary>
private Action<bool> rewardVideoAdCallBack;
private Action<bool> rewardVideoAdCallBackA;
private void mLoadRewardVideoCacheAd_A(string sloatName, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频A组没有数据");
return;
}
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "正序的第一个广告ID" + adList[0].codeId);
if (IsFirstLoadRewardAd)
{
//第一次预加载 A组进行逆序加载
IsFirstLoadRewardAd = false;
adList.Reverse();
}
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "反序的第一个广告ID" + adList[0].codeId);
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
//移除第一条数据
totalEntityList.RemoveAt(0);
rewardVideoAdCallBackA = new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频A组缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
ZXADConfig.Instance.SetAdCache(sloatName, entity, "A");
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频A组缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadRewardVideoAdPlatform(entity, rewardVideoAdCallBackA);
}
}
});
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "A开始缓存激励视频");
mLoadRewardVideoAdPlatform(entity, rewardVideoAdCallBackA);
}
/// <summary>
/// 根据广告List开始加载激励视频缓存
/// </summary>
private Action<bool> rewardVideoAdCallBackB;
private void mLoadRewardVideoCacheAd_B(string sloatName, List<AdEntity> adList)
{
if (adList == null || adList.Count == 0)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频B组没有数据");
return;
}
List<AdEntity> totalEntityList = adList;
AdEntity entity = totalEntityList[0];
//移除第一条数据
totalEntityList.RemoveAt(0);
rewardVideoAdCallBack = new Action<bool>((bl) =>
rewardVideoAdCallBackB = new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
ZXADConfig.Instance.SetAdCache(sloatName, entity,"A");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频B组缓存成功 " + entity.adPlatform + " CodeID " + entity.codeId);
ZXADConfig.Instance.SetAdCache(sloatName, entity, "B");
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频B组缓存失败 " + entity.adPlatform + " CodeID " + entity.codeId);
if (totalEntityList.Count > 0)
{
entity = totalEntityList[0];
totalEntityList.RemoveAt(0);
mLoadRewardVideoAdPlatform(entity, rewardVideoAdCallBack);
mLoadRewardVideoAdPlatform(entity, rewardVideoAdCallBackB);
}
}
});
mLoadRewardVideoAdPlatform(entity, rewardVideoAdCallBack);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "B开始缓存激励视频");
mLoadRewardVideoAdPlatform(entity, rewardVideoAdCallBackB);
}
/// <summary>
/// 激励视频根据广告信息选择加载广告的平台
/// </summary>
......@@ -493,6 +975,7 @@ public class AdManager
/// <param name="callback"></param>
private void mLoadRewardVideoAdPlatform(AdEntity entity, Action<bool> callback)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, entity.codeGroup + "开始加载" + entity.adPlatform + " CodeID " + entity.codeId);
switch (entity.adPlatform)
{
case ZXADConfig.PLANTFORM_AD_TT:
......@@ -515,21 +998,64 @@ public class AdManager
/// <param name="listener">广告回调</param>
public void PlayCacheRewardVideoAd(string slotName, string actionName, ZXADRewardVideoListener listener)
{
AdEntity entity = null;
AdEntity entityA = ZXADConfig.Instance.GetAdCache(slotName, "A");
AdEntity entityB = ZXADConfig.Instance.GetAdCache(slotName, "B");
if (entityA != null && entityB != null)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频 A组 B组 都有缓存数据");
if (entityA.codePrice > entityB.codePrice)
{
entity = entityA;
ZXADConfig.Instance.RemoveAdCache(slotName, "A");
}
else
{
entity = entityB;
ZXADConfig.Instance.RemoveAdCache(slotName, "B");
}
//if (IsFirstLoadRewardAd)
//{
// Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频 第一次预加载,直接播放A组");
// //第一次预加载,直接播放A组
// IsFirstLoadRewardAd = false;
// entity = entityA;
// ZXADConfig.Instance.RemoveAdCache(slotName, "A");
//}
//else
//{
//}
}
else if (entityA != null)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频 A组 有缓存数据");
entity = entityA;
ZXADConfig.Instance.RemoveAdCache(slotName, "A");
}
else if (entityB != null)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, "激励视频 B组 有缓存数据");
entity = entityB;
ZXADConfig.Instance.RemoveAdCache(slotName, "B");
}
AdEntity entity = ZXADConfig.Instance.GetAdCache(slotName,"A");
//AdEntity entity = ZXADConfig.Instance.GetAdCache(slotName,"B");
if (entity != null)
{
mPlayCacheRewardVodeoAdPlatform(entity, listener, new Action<bool>((bl)=> {
mPlayCacheRewardVodeoAdPlatform(entity, listener, new Action<bool>((bl) =>
{
if (bl)
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG,"播放激励视频成功 " + entity.adPlatform + " CodeId" + entity.codeId);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, entity.codeGroup + "播放激励视频成功 " + entity.adPlatform + " CodeId" + entity.codeId);
}
else
{
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG,"播放激励视频失败 "+entity.adPlatform+" CodeId"+entity.codeId);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, entity.codeGroup + "播放激励视频失败 " + entity.adPlatform + " CodeId" + entity.codeId);
}
}));
......@@ -541,7 +1067,7 @@ public class AdManager
}
}
private void mPlayCacheRewardVodeoAdPlatform(AdEntity entity,ZXADRewardVideoListener listener,Action<bool> callback)
private void mPlayCacheRewardVodeoAdPlatform(AdEntity entity, ZXADRewardVideoListener listener, Action<bool> callback)
{
switch (entity.adPlatform)
{
......@@ -558,5 +1084,6 @@ public class AdManager
}
//==================================================================激励视频END================================================
}
......@@ -95,5 +95,13 @@ public class ZXADConfig
return null;
}
public void RemoveAdCache(string slotName, string type)
{
if (AdCacheMap.ContainsKey(type + slotName))
{
AdCacheMap.Remove(type + slotName);
}
}
}
......@@ -80,4 +80,8 @@ public class AdEntity
///
/// </summary>
public List<string> playcomplete_trackings { get; set; }
/// <summary>
///
/// </summary>
public AdEntity bgroup { get; set; }
}
......@@ -6,5 +6,5 @@ public class AdIdConfig
{
public string adPlatform;
public string codeAppId;
public string codeAppKey;
//public string codeAppKey;
}
......@@ -58,23 +58,24 @@ public class CSJBannerUtil
{
var adSlot = new AdSlot.Builder()
#if UNITY_IOS
.SetCodeId("900546269")
.SetCodeId(entity.codeId)
#else
.SetCodeId("901121246")
.SetCodeId(entity.codeId)
////期望模板广告view的size,单位dp,//高度按照实际rit对应宽高传入
#endif
.SetExpressViewAcceptedSize(Screen.width, float.Parse(Screen.width.ToString()) / 600 * 90)
//.SetExpressViewAcceptedSize(Screen.width, float.Parse(Screen.width.ToString()) / 600 * 90)
.SetExpressViewAcceptedSize(Screen.width, float.Parse(Screen.width.ToString()) /4)
.SetSupportDeepLink(true)
.SetImageAcceptedSize(1080, 1920)
.SetAdCount(1)
.SetOrientation(AdOrientation.Horizontal)
.Build();
Debug.LogError("SetExpressViewAcceptedSize:" + float.Parse(Screen.width.ToString()) / 600 * 90);
//Debug.LogError("SetExpressViewAcceptedSize:" + float.Parse(Screen.width.ToString()) / 600 * 90);
this.AdNative.LoadExpressBannerAd(adSlot, new BannerAdListener(callback));
}
public void ShowCacheBannerAd()
public void ShowCacheBannerAd(AdEntity entity,Action<bool> callback)
{
#if UNITY_IOS
if (bannerAdCacheListIOS.Count > 0)
......@@ -86,7 +87,7 @@ public class CSJBannerUtil
//{
// y = 100; // 防止Demo里刘海遮挡
//}
mBanneAd.SetExpressInteractionListener(new ExpressAdInteractionListener(this, entity, callback, 1));
mBanneAd.ShowExpressAd(x, y);
}
else
......@@ -100,12 +101,14 @@ public class CSJBannerUtil
//设置轮播间隔 30s--120s;不设置则不开启轮播
mBanneAd.SetSlideIntervalTime(30 * 1000);
ExpressAdInteractionListener expressAdInteractionListener = new ExpressAdInteractionListener(this, 1);
ExpressAdInteractionListener expressAdInteractionListener = new ExpressAdInteractionListener(this,entity,callback,1);
ExpressAdDislikeCallback dislikeCallback = new ExpressAdDislikeCallback(this, 1);
NativeAdManager.Instance().ShowExpressBannerAd(GetActivity(), mBanneAd.handle, expressAdInteractionListener, dislikeCallback);
}
else
{
callback(false);
Debug.Log("CSJ Banner广告没有缓存数据了");
}
......@@ -159,11 +162,15 @@ public class CSJBannerUtil
private sealed class ExpressAdInteractionListener : IExpressAdInteractionListener
{
private CSJBannerUtil example;
private AdEntity entity;
private Action<bool> callback;
int type;//0:feed 1:banner 2:interstitial
public ExpressAdInteractionListener(CSJBannerUtil example, int type)
public ExpressAdInteractionListener(CSJBannerUtil example, AdEntity entity,Action<bool> callback, int type)
{
this.example = example;
this.entity = entity;
this.callback = callback;
this.type = type;
}
public void OnAdClicked(ExpressAd ad)
......@@ -173,11 +180,13 @@ public class CSJBannerUtil
public void OnAdShow(ExpressAd ad)
{
callback(true);
Debug.Log("express OnAdShow,type:" + type);
}
public void OnAdViewRenderError(ExpressAd ad, int code, string message)
{
callback(false);
Debug.Log("express OnAdViewRenderError,type:" + type);
}
......
......@@ -53,9 +53,9 @@ public class CSJFeedUtil : MonoBehaviour
{
var adSlot = new AdSlot.Builder()
#if UNITY_IOS
.SetCodeId("900546131")
.SetCodeId(entity.codeId)
#else
.SetCodeId("901121253")
.SetCodeId(entity.codeId)
////期望模板广告view的size,单位dp,//高度设置为0,则高度会自适应
.SetExpressViewAcceptedSize(350, 0)
#endif
......@@ -73,7 +73,7 @@ public class CSJFeedUtil : MonoBehaviour
/// 展示缓存的FeedAd
/// </summary>
/// <param name="entity"></param>
public void ShowCacheFeedAd(AdEntity entity)
public void ShowCacheFeedAd(AdEntity entity,Action<bool> callback)
{
if (feedAdCacheList.Count > 0)
{
......@@ -85,15 +85,17 @@ public class CSJFeedUtil : MonoBehaviour
//{
// y = 100; // 防止Demo里刘海遮挡
//}
feedAd.SetExpressInteractionListener(new ExpressAdInteractionListener(this, entity, callback, 0));
feedAd.ShowExpressAd(x, y);
#else
ExpressAdInteractionListener expressAdInteractionListener = new ExpressAdInteractionListener(this, 0);
ExpressAdInteractionListener expressAdInteractionListener = new ExpressAdInteractionListener(this,entity,callback, 0);
ExpressAdDislikeCallback dislikeCallback = new ExpressAdDislikeCallback(this, 0);
NativeAdManager.Instance().ShowExpressFeedAd(GetActivity(), feedAd.handle, expressAdInteractionListener, dislikeCallback);
#endif
}
else
{
callback(false);
Debug.Log("CSJ Feed广告没有缓存数据了");
}
}
......@@ -143,11 +145,15 @@ public class CSJFeedUtil : MonoBehaviour
private sealed class ExpressAdInteractionListener : IExpressAdInteractionListener
{
private CSJFeedUtil example;
private AdEntity entity;
private Action<bool> callback;
int type;//0:feed 1:banner 2:interstitial
public ExpressAdInteractionListener(CSJFeedUtil example, int type)
public ExpressAdInteractionListener(CSJFeedUtil example, AdEntity entity, Action<bool> callback, int type)
{
this.example = example;
this.entity = entity;
this.callback = callback;
this.type = type;
}
public void OnAdClicked(ExpressAd ad)
......@@ -157,11 +163,13 @@ public class CSJFeedUtil : MonoBehaviour
public void OnAdShow(ExpressAd ad)
{
callback(true);
Debug.Log("express OnAdShow,type:" + type);
}
public void OnAdViewRenderError(ExpressAd ad, int code, string message)
{
callback(false);
Debug.Log("express OnAdViewRenderError,type:" + type);
}
......
......@@ -61,10 +61,10 @@ public class CSJInterstitialUtil
{
var adSlot = new AdSlot.Builder()
#if UNITY_IOS
.SetCodeId("900546270")
.SetCodeId(entity.codeId)
.SetExpressViewAcceptedSize(200, 300)
#else
.SetCodeId("901121133")
.SetCodeId(entity.codeId)
.SetExpressViewAcceptedSize(350, 0)
////期望模板广告view的size,单位dp,//高度设置为0,则高度会自适应
#endif
......@@ -75,7 +75,7 @@ public class CSJInterstitialUtil
this.AdNative.LoadExpressInterstitialAd(adSlot, new InterstitialAdListener(callback));
}
public void PlayCacheInterstitialAd(AdEntity entity)
public void PlayCacheInterstitialAd(AdEntity entity,Action<bool> callback)
{
#if UNITY_IOS
if (interstitialAdCacheListIOS.Count > 0)
......@@ -87,10 +87,12 @@ public class CSJInterstitialUtil
//{
// y = 100; // 防止Demo里刘海遮挡
//}
mInterstitialAd.SetExpressInteractionListener(new ExpressAdInteractionListener(this, callback, entity, 1));
mInterstitialAd.ShowExpressAd(x, y);
}
else
{
callback(false);
Debug.Log("CSJ 插屏广告没有缓存数据了");
}
......@@ -98,11 +100,12 @@ public class CSJInterstitialUtil
if (interstitialAdCacheListAndroid.Count > 0)
{
mInterstitialAd = interstitialAdCacheListAndroid.Dequeue();
ExpressAdInteractionListener expressAdInteractionListener = new ExpressAdInteractionListener(this, 1);
ExpressAdInteractionListener expressAdInteractionListener = new ExpressAdInteractionListener(this, callback,entity, 1);
NativeAdManager.Instance().ShowExpressInterstitialAd(GetActivity(), mInterstitialAd.handle, expressAdInteractionListener);
}
else
{
callback(false);
Debug.Log("CSJ 插屏广告没有缓存数据了");
}
#endif
......@@ -155,11 +158,15 @@ public class CSJInterstitialUtil
private sealed class ExpressAdInteractionListener : IExpressAdInteractionListener
{
private CSJInterstitialUtil example;
private Action<bool> callback;
private AdEntity entity;
int type;//0:feed 1:banner 2:interstitial
public ExpressAdInteractionListener(CSJInterstitialUtil example, int type)
public ExpressAdInteractionListener(CSJInterstitialUtil example,Action<bool> callback,AdEntity entity, int type)
{
this.example = example;
this.callback = callback;
this.entity = entity;
this.type = type;
}
public void OnAdClicked(ExpressAd ad)
......
......@@ -48,17 +48,10 @@ public class CSJRewardUtil
public void LoadCacheRewardAd(AdEntity entity, Action<bool> callback)
{
//if (this.rewardAd != null)
//{
// Debug.Log("广告已经加载");
// return;
//}
//string iosSlotID = "945113162";
string iosSlotID = entity.codeId;
//string AndroidSlotID = "901121593";
string AndroidSlotID = entity.codeId;
var adSlot = new AdSlot.Builder()
#if UNITY_IOS
.SetCodeId(iosSlotID)
......@@ -69,20 +62,18 @@ public class CSJRewardUtil
.SetImageAcceptedSize(1080, 1920)
.SetRewardName("金币") // 奖励的名称
.SetRewardAmount(3) // 奖励的数量
.SetUserID("") // 用户id,必传参数
.SetUserID("user123") // 用户id,必传参数
.SetMediaExtra("media_extra") // 附加参数,可选
.SetOrientation(AdOrientation.Vertical) // 必填参数,期望视频的播放方向
.SetOrientation(AdOrientation.Horizontal) // 必填参数,期望视频的播放方向
.Build();
#if UNITY_IOS
this.AdNative.LoadExpressRewardAd(
adSlot, new RewardVideoAdListener(this,entity, callback));
#else
this.AdNative.LoadExpressRewardAd(
this.AdNative.LoadRewardVideoAd(
adSlot, new RewardVideoAdListener(this, entity, callback));
#endif
}
/// <summary>
......@@ -97,7 +88,7 @@ public class CSJRewardUtil
#if UNITY_ANDROID
RewardVideoAd rewardAd = GetRewardVideoAdForAndroid(entity.codeGroup+entity.codeId);
#elif UNITY_IOS
ExpressRewardVideoAd rewardAd = GetRewardVideoAdForIOS("");
ExpressRewardVideoAd rewardAd = GetRewardVideoAdForIOS(entity.codeGroup+entity.codeId);
#endif
if (rewardAd != null)
{
......@@ -107,7 +98,7 @@ public class CSJRewardUtil
else
{
callback(false);
Debug.Log("CSJ 激励视频 缓存不存在");
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG,"CSJ 激励视频 缓存不存在");
}
}
......@@ -129,14 +120,12 @@ public class CSJRewardUtil
public void OnError(int code, string message)
{
Debug.Log("OnRewardError: " + message);
callback(false);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, entity.adPlatform + " 激励视频 Error Group" + entity.codeGroup + " Code " + code + " msg" + message);
}
public void OnRewardVideoAdLoad(RewardVideoAd ad)
{
Debug.Log("OnRewardVideoAdLoad");
//ad.SetRewardAdInteractionListener(
// new RewardAdInteractionListener(this.csjAD));
//ad.SetDownloadListener(
......@@ -151,7 +140,6 @@ public class CSJRewardUtil
public void OnExpressRewardVideoAdLoad(ExpressRewardVideoAd ad)
{
#if UNITY_IOS
this.csjAD.SetRewardVideoAdForIOS(entity.codeGroup+entity.codeId, ad);
callback(true);
......@@ -160,7 +148,6 @@ public class CSJRewardUtil
public void OnRewardVideoCached()
{
Debug.Log("OnRewardVideoCached");
//if (this.csjAD.rewardAd != null)
//{
// this.csjAD.rewardAd.IsDownloaded = true;
......@@ -313,7 +300,6 @@ public class CSJRewardUtil
/// <returns></returns>
private ExpressRewardVideoAd GetRewardVideoAdForIOS(string codeId)
{
codeId = "IOS";
if (mRewardCacheMapIOS.ContainsKey(codeId))
{
Queue<ExpressRewardVideoAd> mRewardQueue = mRewardCacheMapIOS[codeId];
......
......@@ -61,8 +61,10 @@ public class CSJSplshADUtils
/// <param name="listener"></param>
public void LoadSplshAd(AdEntity entity,AndroidJavaObject activity, AndroidJavaObject splashAdManager, ZXADSplashListener listener, Action<bool> callback)
{
string iosSlotID = "800546808";
string AndroidSlotID = "801121648";
//string iosSlotID = "800546808";
//string AndroidSlotID = "801121648";
string iosSlotID = entity.codeId;
string AndroidSlotID = entity.codeId;
//// 横屏 开屏的横屏配置需要在服务端针对广告位进行设置
//if (this.getScreenOrientationConfig() == 1)
//{
......
......@@ -23,22 +23,22 @@ public final class UnionApplication extends Application {
AppliContext.init(this);
TTAdConfig config = new TTAdConfig.Builder()
//.appId("5001121")
.appId("5145269")
.useTextureView(false) //使用TextureView控件播放视频,默认为SurfaceView,当有SurfaceView冲突的场景,可以使用TextureView
.appName("APP测试媒体")
.titleBarTheme(TTAdConstant.TITLE_BAR_THEME_DARK)
.allowShowNotify(true) //是否允许sdk展示通知栏提示
.allowShowPageWhenScreenLock(true) //是否在锁屏场景支持展示广告落地页
.debug(true) //测试阶段打开,可以通过日志排查问题,上线时去除该调用
.directDownloadNetworkType(TTAdConstant.NETWORK_STATE_WIFI, TTAdConstant.NETWORK_STATE_3G) //允许直接下载的网络状态集合
.supportMultiProcess(false) //是否支持多进程,true支持
.customController(getController())//控制隐私数据
.build();
// TTAdConfig config = new TTAdConfig.Builder()
// //.appId("5001121")
// .appId("5145269")
// .useTextureView(false) //使用TextureView控件播放视频,默认为SurfaceView,当有SurfaceView冲突的场景,可以使用TextureView
// .appName("APP测试媒体")
// .titleBarTheme(TTAdConstant.TITLE_BAR_THEME_DARK)
// .allowShowNotify(true) //是否允许sdk展示通知栏提示
// .allowShowPageWhenScreenLock(true) //是否在锁屏场景支持展示广告落地页
// .debug(true) //测试阶段打开,可以通过日志排查问题,上线时去除该调用
// .directDownloadNetworkType(TTAdConstant.NETWORK_STATE_WIFI, TTAdConstant.NETWORK_STATE_3G) //允许直接下载的网络状态集合
// .supportMultiProcess(false) //是否支持多进程,true支持
// .customController(getController())//控制隐私数据
// .build();
// 强烈建议在应用对应的Application#onCreate()方法中调用,避免出现content为null的异常
TTAdSdk.init(this, config);
// // 强烈建议在应用对应的Application#onCreate()方法中调用,避免出现content为null的异常
// TTAdSdk.init(this, config);
//如果明确某个进程不会使用到广告SDK,可以只针对特定进程初始化广告SDK的content
//if (PROCESS_NAME_XXXX.equals(processName)) {
......@@ -46,45 +46,45 @@ public final class UnionApplication extends Application {
//}
}
private static TTCustomController getController() {
MyTTCustomController customController = new MyTTCustomController();
return customController;
}
// private static TTCustomController getController() {
// MyTTCustomController customController = new MyTTCustomController();
// return customController;
// }
private static class MyTTCustomController extends TTCustomController{
@Override
public boolean isCanUseLocation() {
return super.isCanUseLocation();
}
// private static class MyTTCustomController extends TTCustomController{
// @Override
// public boolean isCanUseLocation() {
// return super.isCanUseLocation();
// }
@Override
public TTLocation getTTLocation() {
return super.getTTLocation();
}
// @Override
// public TTLocation getTTLocation() {
// return super.getTTLocation();
// }
@Override
public boolean alist() {
return super.alist();
}
// @Override
// public boolean alist() {
// return super.alist();
// }
@Override
public boolean isCanUsePhoneState() {
return super.isCanUsePhoneState();
}
// @Override
// public boolean isCanUsePhoneState() {
// return super.isCanUsePhoneState();
// }
@Override
public String getDevImei() {
return super.getDevImei();
}
// @Override
// public String getDevImei() {
// return super.getDevImei();
// }
@Override
public boolean isCanUseWifiState() {
return super.isCanUseWifiState();
}
// @Override
// public boolean isCanUseWifiState() {
// return super.isCanUseWifiState();
// }
@Override
public boolean isCanUseWriteExternal() {
return super.isCanUseWriteExternal();
}
}
// @Override
// public boolean isCanUseWriteExternal() {
// return super.isCanUseWriteExternal();
// }
// }
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1508,7 +1508,7 @@ Camera:
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.42986825, g: 0.7849259, b: 0.8679245, a: 0}
m_BackGroundColor: {r: 0.17702031, g: 0.8137047, b: 0.9622642, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
......@@ -2869,80 +2869,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2017943968}
m_CullTransparentMesh: 0
--- !u!1001 &2110713141
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2853166085728200632, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_Name
value: HTTP
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200634, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: IS_TGYZ
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_RootOrder
value: 4
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2853166085728200635, guid: 1053be02c113a7a45adf322c929b0cb6,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 1053be02c113a7a45adf322c929b0cb6, type: 3}
--- !u!1 &2116183217
GameObject:
m_ObjectHideFlags: 0
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
<<<<<<< HEAD
AdManager.Instance.LoadCacheFSVideoAd("fullvideo");
=======
//AdManager.Instance.LoadCacheFSVideoAd();
>>>>>>> c9dc7224cab183311983fe752879dab5c389d597
}
public void OnClickPlayFullScreeVideoAd()
{
<<<<<<< HEAD
AdManager.Instance.PlayCacheFSVideoAd("fullvideo", "test", new FullScreenAdListener(this));
=======
//AdManager.Instance.PlayCacheFSVideoAd(new FullScreenAdListener(this));
>>>>>>> c9dc7224cab183311983fe752879dab5c389d597
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
<<<<<<< HEAD
AdManager.Instance.LoadCacheFSVideoAd("fullvideo");
=======
//AdManager.Instance.LoadCacheFSVideoAd();
>>>>>>> c9dc7224cab183311983fe752879dab5c389d597
}
public void OnClickPlayFullScreeVideoAd()
{
<<<<<<< HEAD
AdManager.Instance.PlayCacheFSVideoAd("fullvideo", "test", new FullScreenAdListener(this));
=======
//AdManager.Instance.PlayCacheFSVideoAd(new FullScreenAdListener(this));
>>>>>>> c9dc7224cab183311983fe752879dab5c389d597
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
AdManager.Instance.LoadCacheFSVideoAd();
}
public void OnClickPlayFullScreeVideoAd()
{
AdManager.Instance.PlayCacheFSVideoAd(new FullScreenAdListener(this));
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
AdManager.Instance.LoadCacheFSVideoAd();
}
public void OnClickPlayFullScreeVideoAd()
{
AdManager.Instance.PlayCacheFSVideoAd(new FullScreenAdListener(this));
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
AdManager.Instance.LoadCacheFSVideoAd("fullvideo");
}
public void OnClickPlayFullScreeVideoAd()
{
AdManager.Instance.PlayCacheFSVideoAd("fullvideo", "test", new FullScreenAdListener(this));
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
AdManager.Instance.LoadCacheFSVideoAd("fullvideo");
}
public void OnClickPlayFullScreeVideoAd()
{
AdManager.Instance.PlayCacheFSVideoAd("fullvideo", "test", new FullScreenAdListener(this));
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
//AdManager.Instance.LoadCacheFSVideoAd();
}
public void OnClickPlayFullScreeVideoAd()
{
//AdManager.Instance.PlayCacheFSVideoAd(new FullScreenAdListener(this));
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class AdDemo : MonoBehaviour
{
public Text RewardAdResult;
public void OnClickLoadRewardAd()
{
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void OnClickPlayRewardAd()
{
AdManager.Instance.PlayCacheRewardVideoAd("video", "test", new RewardAdListener(this));
}
public sealed class RewardAdListener : ZXADRewardVideoListener
{
private AdDemo demo;
public RewardAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "Reward onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "Reward onAdShow";
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "Reward onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "Reward onError" + errorMsg;
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "Reward onSuccess";
}
}
public void OnClickInitAd()
{
//AdManager.Instance.LoadSplshAd(new SplshAdListener(this));
AdManager.Instance.InitAd();
}
public void OnClickPlaySplshAd()
{
AdManager.Instance.LoadSplashAd(new SplshAdListener(this));
}
private sealed class SplshAdListener : ZXADSplashListener
{
private AdDemo demo;
public SplshAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "开屏展示";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "开屏跳过";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "开屏错误" + errorMsg;
}
}
public void OnClickLoadBannerAd()
{
AdManager.Instance.LoadCacheBannerAd();
}
public void OnClickShowBannerAd()
{
AdManager.Instance.ShowCacheBannerAd();
}
public void OnClickLoadFeed()
{
AdManager.Instance.LoadCacheFeedAd();
}
public void OnClickShowFeed()
{
AdManager.Instance.ShowCacheFeedAd();
}
public void OnClickLoadInterAd()
{
AdManager.Instance.LoadCacheInterstitialAd();
}
public void OnClickPlayInterAd()
{
AdManager.Instance.PlayCacheInterstitialAd();
}
public void OnClickLoadFullScreeVideoAd()
{
//AdManager.Instance.LoadCacheFSVideoAd();
}
public void OnClickPlayFullScreeVideoAd()
{
//AdManager.Instance.PlayCacheFSVideoAd(new FullScreenAdListener(this));
}
private sealed class FullScreenAdListener : ZXADFullScreenVideoListener
{
private AdDemo demo;
public FullScreenAdListener(AdDemo demo)
{
this.demo = demo;
}
public void onAdClose()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdClose";
}
public void onAdShow()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdShow";
}
public void onAdSkip()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdSkip";
}
public void onAdVideoBarClick()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onAdVideoBarClick";
}
public void onError(string errorMsg)
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onError";
}
public void onSuccess()
{
this.demo.RewardAdResult.text = "FullScreenVideoAD onSuccess";
}
}
}
......@@ -28,8 +28,8 @@ public class GDTBannerAdUtil
/// </summary>
public void LoadCacheBannerAd(AdEntity entity, Action<bool> callback)
{
UnifiedBannerAd ad = new UnifiedBannerAd(Constants.bannerPosId, new AdSize(375, 60));
ad.SetListener(new BannerListener(ad, callback));
UnifiedBannerAd ad = new UnifiedBannerAd(entity.codeId, new AdSize(375, 60));
ad.SetListener(new BannerListener(ad, entity, callback));
ad.LoadAndShowAd();
}
......@@ -38,7 +38,7 @@ public class GDTBannerAdUtil
/// </summary>
/// <param name="entity"></param>
private UnifiedBannerAd gdtBannerAd;
public void ShowCacheBannerAd(AdEntity entity)
public void ShowCacheBannerAd(AdEntity entity,Action<bool> callback)
{
if (bannerCacheList.Count > 0)
{
......@@ -47,6 +47,7 @@ public class GDTBannerAdUtil
gdtBannerAd.CloseAd();
}
gdtBannerAd = bannerCacheList.Dequeue();
gdtBannerAd.SetListener(new BannerListener(gdtBannerAd,entity,callback));
#if UNITY_ANDROID
AndroidDemoUtils.ShowView(gdtBannerAd.GetAndroidNativeView(), true);
#elif UNITY_IOS
......@@ -55,6 +56,7 @@ public class GDTBannerAdUtil
}
else
{
callback(false);
Debug.Log("GDT Banner广告没有缓存数据了");
}
}
......@@ -63,10 +65,12 @@ public class GDTBannerAdUtil
/// </summary>
private sealed class BannerListener : IUnifiedBannerAdListener
{
private AdEntity entity;
private Action<bool> callback;
private UnifiedBannerAd bannerAD;
public BannerListener(UnifiedBannerAd bannerAD, Action<bool> callback)
public BannerListener(UnifiedBannerAd bannerAD, AdEntity entity,Action<bool> callback)
{
this.entity = entity;
this.bannerAD = bannerAD;
this.callback = callback;
}
......@@ -97,6 +101,7 @@ public class GDTBannerAdUtil
/// </summary>
public void OnAdExposured()
{
callback(true);
string msg = "OnAdExposured";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
......
......@@ -37,10 +37,10 @@ public class GDTFeedAdUtil
public void LoadCacheFeedAd(AdEntity entity, Action<bool> callback)
{
//string PosId = Constants.nativeExpressPosId;//不带视频的大图广告
string PosId = Constants.nativeExpressVideoPosId;//带视频的大图广告
//string PosId = Constants.nativeExpressVideoPosId;//带视频的大图广告
NativeExpressAd ad = new NativeExpressAd(PosId, GetAdSize());
ad.SetListener(new FeedAdListener(callback));
NativeExpressAd ad = new NativeExpressAd(entity.codeId, GetAdSize());
ad.SetListener(new FeedAdListener(entity,callback));
ad.LoadAd(1);
}
......@@ -48,7 +48,7 @@ public class GDTFeedAdUtil
/// 展示缓存的FeedAd
/// </summary>
/// <param name="entity"></param>
public void ShowCacheFeedAd(AdEntity entity)
public void ShowCacheFeedAd(AdEntity entity,Action<bool> callback)
{
if (feedAd != null)
{
......@@ -57,7 +57,6 @@ public class GDTFeedAdUtil
if (feedAdCacheList.Count > 0)
{
feedAd = feedAdCacheList.Dequeue();
#if UNITY_IOS
// iOS 广告加载完毕即可展示
feedAd.Render();
......@@ -82,6 +81,7 @@ public class GDTFeedAdUtil
}
else
{
callback(false);
Debug.Log("GDT Feed广告没有缓存数据了");
}
......@@ -101,9 +101,11 @@ public class GDTFeedAdUtil
private sealed class FeedAdListener: INativeExpressAdListener
{
private AdEntity entity;
private Action<bool> callback;
public FeedAdListener(Action<bool> callback)
public FeedAdListener(AdEntity entity,Action<bool> callback)
{
this.entity = entity;
this.callback = callback;
}
......@@ -150,6 +152,7 @@ public class GDTFeedAdUtil
/// </summary>
public void OnAdViewRenderSuccess(NativeExpressAdView adView)
{
callback(true);
string msg = "OnAdViewRenderSuccess";
Debug.unityLogger.Log(Constants.tagForLog, msg);
//Debug.unityLogger.Log(Constants.tagForLog, "nativeexpressad ecpmlevel=" + example.view.GetECPMLevel());
......@@ -160,6 +163,7 @@ public class GDTFeedAdUtil
/// </summary>
public void OnAdViewRenderFailed(NativeExpressAdView adView)
{
callback(false);
string msg = "OnAdViewRenderFailed";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
......@@ -169,6 +173,7 @@ public class GDTFeedAdUtil
/// </summary>
public void OnAdExposured(NativeExpressAdView adView)
{
callback(true);
string msg = "OnAdExposured";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
......@@ -299,6 +304,7 @@ public class GDTFeedAdUtil
/// </summary>
public void OnVideoError(NativeExpressAdView adView, AdError error)
{
callback(false);
string msg = "OnVideoError" + error.GetErrorMsg();
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
......
......@@ -96,8 +96,6 @@ public class GDTFullScreenAdUtil
callback(true);
example.SetFSVideoAd(entity.codeGroup+entity.codeId, ad);
}
string msg = "OnAdLoaded";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -114,8 +112,7 @@ public class GDTFullScreenAdUtil
/// </summary>
public void OnAdShown()
{
string msg = "OnAdShown";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -127,8 +124,6 @@ public class GDTFullScreenAdUtil
{
listener.onAdShow();
}
string msg = "OnAdExposured";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -140,8 +135,6 @@ public class GDTFullScreenAdUtil
{
listener.onAdVideoBarClick();
}
string msg = "OnAdClicked";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -149,8 +142,7 @@ public class GDTFullScreenAdUtil
/// </summary>
public void OnAdLeaveApp()
{
string msg = "OnAdLeaveApp";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -166,8 +158,6 @@ public class GDTFullScreenAdUtil
}
listener.onAdClose();
}
string msg = "OnAdClosed";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
#if UNITY_ANDROID
......@@ -177,8 +167,7 @@ public class GDTFullScreenAdUtil
public void OnVideoCached()
{
// 视频素材加载完成,在此时调用展示,视频广告不会有进度条。
string msg = "OnVideoCached";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
#endif
......@@ -187,8 +176,7 @@ public class GDTFullScreenAdUtil
/// </summary>
public void OnVideoInit()
{
string msg = "OnVideoInit";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -196,8 +184,7 @@ public class GDTFullScreenAdUtil
/// </summary>
public void OnVideoLoading()
{
string msg = "OnVideoLoading";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -209,8 +196,6 @@ public class GDTFullScreenAdUtil
{
listener.onSuccess();
}
string msg = "OnVideoStarted";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -218,8 +203,6 @@ public class GDTFullScreenAdUtil
/// </summary>
public void OnVideoPaused()
{
string msg = "OnVideoPaused";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -229,8 +212,6 @@ public class GDTFullScreenAdUtil
{
isSkipAd = false;
string msg = "OnVideoCompleted";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -243,8 +224,6 @@ public class GDTFullScreenAdUtil
listener.onError("GDT 全屏视频播放失败");
}
callback(false);
string msg = "OnVideoError";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -252,8 +231,7 @@ public class GDTFullScreenAdUtil
/// </summary>
public void OnVideoDetailPageShown()
{
string msg = "OnVideoDetailPageShown";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -261,8 +239,7 @@ public class GDTFullScreenAdUtil
/// </summary>
public void OnVideoDetailPageClosed()
{
string msg = "OnVideoDetailPageClosed";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
}
......
......@@ -35,10 +35,10 @@ public class GDTInterstitialAdUtil
public void LoadCacheInterstitialAd(AdEntity entity, Action<bool> callback)
{
string posId = Constants.intersititialVideoPosId;//带视频插屏测试广告
//string posId = Constants.intersititialVideoPosId;//带视频插屏测试广告
//string posId = Constants.intersititialNoVideoPosId;//不带视频的插屏广告测试Id
UnifiedInterstitialAd ad = new UnifiedInterstitialAd(posId);
UnifiedInterstitialAd ad = new UnifiedInterstitialAd(entity.codeId);
ad.SetListener(new UnifiedInterstitialAdListener(ad,callback));
ad.LoadAd();
}
......@@ -47,15 +47,17 @@ public class GDTInterstitialAdUtil
/// 播放缓存的插屏广告
/// </summary>
/// <param name="entity"></param>
public void PlayCacheInterstitialAd(AdEntity entity)
public void PlayCacheInterstitialAd(AdEntity entity,Action<bool> callback)
{
if (interstitialAdCacheList.Count > 0)
{
UnifiedInterstitialAd interAd = interstitialAdCacheList.Dequeue();
interAd.SetListener(new UnifiedInterstitialAdListener(interAd, callback));
interAd.Show();
}
else
{
callback(false);
Debug.Log("GDT 插屏广告没有缓存数据了");
}
}
......@@ -82,8 +84,6 @@ public class GDTInterstitialAdUtil
{
interstitialAdCacheList.Enqueue(ad);
callback(true);
string msg = "OnAdLoaded";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -92,8 +92,6 @@ public class GDTInterstitialAdUtil
public void OnError(AdError error)
{
callback(false);
string msg = "OnError" + error.GetErrorMsg();
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -101,8 +99,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnAdShown()
{
string msg = "OnAdShown";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -110,8 +107,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnAdExposured()
{
string msg = "OnAdExposured";
Debug.unityLogger.Log(Constants.tagForLog, msg);
callback(true);
}
/// <summary>
......@@ -119,8 +115,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnAdClicked()
{
string msg = "OnAdClicked";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -128,8 +123,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnAdLeaveApp()
{
string msg = "OnAdLeaveApp";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -137,8 +131,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnAdClosed()
{
string msg = "OnAdClosed";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
#if UNITY_ANDROID
......@@ -148,8 +141,7 @@ public class GDTInterstitialAdUtil
public void OnVideoCached()
{
// 视频素材加载完成,在此时调用展示,视频广告不会有进度条。
string msg = "OnVideoCached";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
#endif
......@@ -158,8 +150,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoInit()
{
string msg = "OnVideoInit";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -167,8 +158,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoLoading()
{
string msg = "OnVideoLoading";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -176,8 +166,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoStarted()
{
string msg = "OnVideoStarted";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -185,8 +174,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoPaused()
{
string msg = "OnVideoPaused";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -194,8 +182,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoCompleted()
{
string msg = "OnVideoCompleted";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -203,8 +190,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoError()
{
string msg = "OnVideoError";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -212,8 +198,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoDetailPageShown()
{
string msg = "OnVideoDetailPageShown";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
/// <summary>
......@@ -221,8 +206,7 @@ public class GDTInterstitialAdUtil
/// </summary>
public void OnVideoDetailPageClosed()
{
string msg = "OnVideoDetailPageClosed";
Debug.unityLogger.Log(Constants.tagForLog, msg);
}
}
}
......@@ -28,9 +28,9 @@ public class GDTRewardAdUtil
/// <param name="callback"></param>
public void LoadCacheRewardAd(AdEntity entity, Action<bool> callback)
{
RewardVideoAd rewardVideoAd = new RewardVideoAd(Constants.rewardVideoPosId);
RewardVideoAd rewardVideoAd = new RewardVideoAd(entity.codeId);
rewardVideoAd.SetListener(new RewardVideoAdListener(this, entity, rewardVideoAd, callback, true));
rewardVideoAd.SetVideoMuted(false);//设置声音
rewardVideoAd.SetVideoMuted(true);//设置声音
rewardVideoAd.LoadAd();
}
......@@ -50,7 +50,7 @@ public class GDTRewardAdUtil
#if UNITY_IOS
rewardAd.SetEnableDefaultAudioSessionSetting(false);
#endif
rewardAd.SetVideoMuted(false);//设置是否打开声音
rewardAd.SetVideoMuted(true);//设置是否打开声音
rewardAd.ShowAD();
}
else
......@@ -128,11 +128,13 @@ public class GDTRewardAdUtil
public void OnError(AdError error)
{
if (listener != null)
{
listener.onError("GDT RewardVideo ErrorCode" + error.GetErrorCode() + " Msg:" + error.GetErrorMsg());
}
callback(false);
Debug.unityLogger.Log(ZXADConfig.ADManagerTAG, entity.adPlatform + " 激励视频 Error Group" + entity.codeGroup + " Code " + error.GetErrorCode() + " msg" + error.GetErrorMsg());
}
public void OnRewarded()
......
......@@ -9,6 +9,7 @@ PluginImporter:
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
......
fileFormatVersion: 2
guid: ea5489225a2e4482096765b124c62e25
guid: cbfc243b533794f4a9a553e3e085f2be
folderAsset: yes
DefaultImporter:
externalObjects: {}
......
......@@ -16,6 +16,8 @@ public class Splash : MonoBehaviour
/// </summary>
private void Awake()
{
//Application.runInBackground = true;
}
......@@ -46,6 +48,7 @@ public class Splash : MonoBehaviour
{
yield return new WaitForSeconds(3f);
AdManager.Instance.LoadSplashAd(new SplshAdListener());
AdManager.Instance.LoadCacheRewardVideoAd("video");
}
private sealed class SplshAdListener : ZXADSplashListener
......@@ -61,6 +64,7 @@ public class Splash : MonoBehaviour
public void onError(string errorMsg)
{
SceneManager.LoadScene("AdDemo");
}
}
......
fileFormatVersion: 2
guid: ddf78793cf99f4b699c5a9dcf9cc2b60
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
......@@ -2,7 +2,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
using UnityEngine;
using UnityEngine.Android;
using UnityEngine.UI;
......@@ -36,7 +35,7 @@ public class HttpTest : MonoBehaviour
public void OnClickPost()
{
Dictionary<string, string> d = new Dictionary<string, string>();
Dictionary<string, object> d = new Dictionary<string, object>();
d.Add("type", "1");
//HttpTool.Instance._Post("app/v1/game/xynt/use_fertilize", "", null, actionRes);
HttpTool.Instance._Post("app/v1/game/xynt/box_reward", d, new Action<TestBean>((bean) =>
......@@ -80,7 +79,7 @@ public class HttpTest : MonoBehaviour
AndroidJavaClass cpuUtils = new AndroidJavaClass(
"com.unity.adcommon.unity.CpuUtils");
Dictionary<string, string> d = new Dictionary<string, string>();
Dictionary<string, object> d = new Dictionary<string, object>();
d.Add("md5", PrefenceUtils.GetInstance().getMd5());
d.Add("type", cpuUtils.CallStatic<string>("getArchType"));
HttpTool.Instance._Get("app/v1/novel/info", d, new Action<TestBean>((bean) =>
......
......@@ -6,7 +6,9 @@ using System;
using System.Text;
using System.Linq;
using LitJson;
using System.Net.Http;
using System.Net;
using System.Net.Http.Headers;
public delegate void HttpResponse(string result);
......@@ -19,7 +21,7 @@ public class HttpTool : MonoBehaviour
private static HttpTool _instacne = null;
private string TEST_BASE_URL = "http://feedapitest3.zhangxinhulian.com/";//测试
private string TEST_BASE_URL = "http://feedapitest.zhangxinhulian.com/";//测试
private string TEST_AD_BASE_URL = "https://bstest.zhangxinhulian.com/";//测试
private string PRODUCT_BASE_URL = "https://feedapi.zhangxinhulian.com/";//正式
......@@ -29,9 +31,7 @@ public class HttpTool : MonoBehaviour
private int timeOut = 10;//超时时间
Dictionary<string, string> requestHeader = new Dictionary<string, string>(); // header
Dictionary<string, object> requestHeader = new Dictionary<string, object>(); // header
public static HttpTool Instance
{
get
......@@ -48,7 +48,7 @@ public class HttpTool : MonoBehaviour
{
if (IS_TEST)
{
baseUrl = TEST_AD_BASE_URL;
baseUrl = TEST_BASE_URL;
}
else
{
......@@ -62,22 +62,76 @@ public class HttpTool : MonoBehaviour
requestHeader.Add("Content-Type", "application/json");
}
public void _Get<T>(string methodName, Dictionary<string, string> getParas,Action<T> success, Action<string,string> failed)
public void _GetAD<T>(string methodName, Dictionary<string, object> getParas, Action<T> success, Action<string, string> failed)
{
string AdUrl;
if (IS_TEST)
{
AdUrl = TEST_AD_BASE_URL;
}
else
{
AdUrl = PRODUCT_BASE_URL;
}
var handler = new HttpClientHandler()
{
AutomaticDecompression = DecompressionMethods.GZip
};
try
{
using (var http = new HttpClient(handler))
{
using (HttpContent content = new StringContent(""))
{
//content.Headers.ContentType = new MediaTypeHeaderValue("application/json;charset=UTF-8");
var response = http.GetAsync(AdUrl + methodName + "?" + addParams(getParas)).Result; // postParaStr 注意拼接好
string rsult = response.Content.ReadAsStringAsync().Result;
if (response.IsSuccessStatusCode)
{
RequestResult(rsult, success, failed);
}
else
{
if (failed != null)
{
failed("0", rsult);
}
}
}
};
}
catch (Exception ex)
{
if (failed != null)
{
failed("-1", ex.Message);
}
}
}
public void _Get<T>(string methodName, Dictionary<string, object> getParas, Action<T> success, Action<string, string> failed)
{
StartCoroutine(GetRequest(methodName, getParas, success,failed));
StartCoroutine(GetRequest(baseUrl,methodName, getParas, success, failed));
}
public IEnumerator GetRequest<T>(string methodName, Dictionary<string, string> getParas, Action<T> success, Action<string, string> failed)
public IEnumerator GetRequest<T>(string BaseURL,string methodName, Dictionary<string, object> getParas, Action<T> success, Action<string, string> failed)
{
string url = baseUrl + methodName + "?" + addParams(getParas);
string url = BaseURL + methodName + "?" + addParams(getParas);
Debug.unityLogger.Log(HttpLogTag, "GET RequestUrl=> " + url);
using (UnityWebRequest webRequest = UnityWebRequest.Get(url))
{
//设置header
foreach (var v in requestHeader)
{
webRequest.SetRequestHeader(v.Key, v.Value);
webRequest.SetRequestHeader(v.Key, (string)v.Value);
}
webRequest.timeout = timeOut;
yield return webRequest.SendWebRequest();
......@@ -99,13 +153,13 @@ public class HttpTool : MonoBehaviour
}
//jsonString 为json字符串,post提交的数据包为json
public void _Post<T>(string methodName, Dictionary<string, string> postParas, Action<T> success, Action<string, string> failed)
public void _Post<T>(string methodName, Dictionary<string, object> postParas, Action<T> success, Action<string, string> failed)
{
StartCoroutine(PostRequest(methodName, "", postParas, success,failed));
StartCoroutine(PostRequest(baseUrl, methodName, "", postParas, success, failed));
}
public IEnumerator PostRequest<T>(string methodName, string jsonString, Dictionary<string, string> postParas, Action<T> success, Action<string, string> failed)
public IEnumerator PostRequest<T>(string BaseURL,string methodName, string jsonString, Dictionary<string, object> postParas, Action<T> success, Action<string, string> failed)
{
string url = baseUrl + methodName +"?" + addParams(postParas);
string url = BaseURL + methodName + "?" + addParams(postParas);
Debug.unityLogger.Log(HttpLogTag, "POST RequestUrl=> " + url);
//Debug.Log("POST 请求 :url: \n" + url);
//Debug.Log(string.Format("url:{0} postData:{1}", url, jsonString));
......@@ -122,7 +176,7 @@ public class HttpTool : MonoBehaviour
foreach (var v in requestHeader)
{
webRequest.SetRequestHeader(v.Key, v.Value);
webRequest.SetRequestHeader(v.Key, (string)v.Value);
}
webRequest.timeout = timeOut;
yield return webRequest.SendWebRequest();
......@@ -143,7 +197,7 @@ public class HttpTool : MonoBehaviour
}
private void RequestResult<T>(string json,Action<T> success, Action<string, string> failed)
private void RequestResult<T>(string json, Action<T> success, Action<string, string> failed)
{
Debug.unityLogger.Log(HttpLogTag, "Json=> " + json);
if (success != null)
......@@ -167,7 +221,7 @@ public class HttpTool : MonoBehaviour
{
if (failed != null)
{
failed("", e.Message);
failed("-2", e.Message);
}
}
......@@ -175,20 +229,20 @@ public class HttpTool : MonoBehaviour
}
public string appLs= "1d8a0d53c33a9b95";
public string appLs = "1d8a0d53c33a9b95";
public string appkey = "faba1d018f76086";
private string addParams(Dictionary<string, string> request)
private string addParams(Dictionary<string, object> request)
{
if (request == null)
{
request = new Dictionary<string, string>();
request = new Dictionary<string, object>();
}
string strTemp = string.Empty;
//定义
Dictionary<string, string> paragrams = request;
Dictionary<string, object> paragrams = request;
if (IS_TGYZ)
if (IS_TEST)
{
paragrams.Add("zygt", "hzwz");
paragrams.Add("tgtk", "1");
......@@ -202,7 +256,7 @@ public class HttpTool : MonoBehaviour
paragrams.Add("token", PrefenceUtils.GetInstance().getToken());
paragrams.Add("appLs", appLs);
paragrams.Add("appKey",appkey);
paragrams.Add("appKey", appkey);
paragrams.Add("city", "");
paragrams.Add("lon", "");
......@@ -224,7 +278,7 @@ public class HttpTool : MonoBehaviour
paragrams.Add("ntt", PrefenceUtils.GetInstance().getNTT());
paragrams.Add("carrier", PrefenceUtils.GetInstance().getCarrier());
paragrams.Add("w", ""+Screen.width);
paragrams.Add("w", "" + Screen.width);
paragrams.Add("vn", PrefenceUtils.GetInstance().getVN());
paragrams.Add("imei", PrefenceUtils.GetInstance().getImei());
#if UNITY_ANDROID
......@@ -233,7 +287,7 @@ public class HttpTool : MonoBehaviour
paragrams.Add("aid", SystemInfo.deviceUniqueIdentifier);//TODO 有bug
#endif
paragrams.Add("device", PrefenceUtils.GetInstance().getDevice());
paragrams.Add("ts", ""+(DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000);
paragrams.Add("ts", "" + (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000);
#if UNITY_IOS
paragrams.Add("platform", "ios");
paragrams.Add("source", "AppStore");
......@@ -245,10 +299,10 @@ public class HttpTool : MonoBehaviour
#endif
string signString = signParamsWithDict(paragrams);
paragrams.Add("sign", signString);
foreach (KeyValuePair<string, string> item in paragrams)
foreach (KeyValuePair<string, object> item in paragrams)
{
// && !string.IsNullOrEmpty(item.Value)
if (!string.IsNullOrEmpty(item.Key) && !string.IsNullOrEmpty(item.Value))
if (!string.IsNullOrEmpty(item.Key) && !string.IsNullOrEmpty(Convert.ToString(item.Value)))
{
strTemp += item.Key + "=" + item.Value + "&";
}
......@@ -265,14 +319,14 @@ public class HttpTool : MonoBehaviour
/// </summary>
/// <param name="dict"></param>
/// <returns></returns>
public string signParamsWithDict(Dictionary<string, string> dict)
public string signParamsWithDict(Dictionary<string, object> dict)
{
// 通过key 排序
Dictionary<string, string> dic1_SortedByKey = dict.OrderBy(p => p.Key).ToDictionary(p => p.Key, o => o.Value);
Dictionary<string, object> dic1_SortedByKey = dict.OrderBy(p => p.Key).ToDictionary(p => p.Key, o => o.Value);
string mutaSting = "";
//遍历字典
foreach (KeyValuePair<string, string> kvp in dic1_SortedByKey)
foreach (KeyValuePair<string, object> kvp in dic1_SortedByKey)
{
//Debug.Log(kvp.Key + ":" + kvp.Value);
mutaSting += kvp.Value;
......@@ -325,70 +379,29 @@ public class HttpTool : MonoBehaviour
return imei0;
//texts[18].text = "IMEI1:" + imei1;
//texts[19].text = "MEID:" + meid;
}catch (Exception e)
}
catch (Exception e)
{
return "";
}
}
#endregion
public void TestPost<T>(string url, Dictionary<string, string> postParas, Action<BaseBean<T>> success,Action<ErrorBean> action1)
{
StartCoroutine(GetRequest<T>(url, postParas, success, action1));
}
public IEnumerator GetRequest<T>(string methodName, Dictionary<string, string> getParas, Action<BaseBean<T>> t,Action<ErrorBean> error)
{
string url = baseUrl + methodName + "?" + addParams(getParas);
#endregion
//string url = baseUrl + methodName;
Debug.Log("GET 请求 :url: \n" + url);
using (UnityWebRequest webRequest = UnityWebRequest.Get(url))
{
//设置header
foreach (var v in requestHeader)
void OnApplicationPause(bool paused)
{
webRequest.SetRequestHeader(v.Key, v.Value);
}
webRequest.timeout = timeOut;
yield return webRequest.SendWebRequest();
string result;
if (webRequest.isHttpError || webRequest.isNetworkError)
Debug.unityLogger.Log("TIME_SCALE",paused+"当前速率" + Time.timeScale);
if (paused)
{
Debug.LogError(webRequest.error + "\n" + webRequest.downloadHandler.text);
result = webRequest.error;
//TODO error
//程序进入后台时执行
; Debug.unityLogger.Log("当前速率" + Time.timeScale);
//Time.timeScale = 1;
}
else
{
result = webRequest.downloadHandler.text;
BaseBean<T> baseBean = JsonUtility.FromJson<BaseBean<T>>(result);
switch (baseBean.status)
{
case 200:
break;
case 105:
break;
default:
break;
//程序从后台进入前台时
}
}
}
}
}
......@@ -12,12 +12,12 @@ EditorBuildSettings:
path: Assets/AD/GDT/UnionDemo/UnionExample.unity
guid: 6c963ae210fa3c3438c2f6770ee81fc9
- enabled: 1
path: Assets/Splash/Splash.unity
path: Assets/Game/Splash/Splash.unity
guid: 37af8cf3fb373478ab04e3ee2f3b700a
- enabled: 1
path: Assets/AD/Demo/AdDemo.unity
guid: ef80a35d44f809e4a8957d1ed9571fd2
- enabled: 1
- enabled: 0
path: Assets/NetWork/Demo/HttpDemo.unity
guid: 1d254830c8b62484bb74d303cbb2cc3d
m_configObjects: {}
......@@ -262,15 +262,15 @@ PlayerSettings:
AndroidTargetArchitectures: 1
AndroidSplashScreenScale: 0
androidSplashScreen: {fileID: 0}
AndroidKeystoreName:
AndroidKeyaliasName:
AndroidKeystoreName: D:/antearn.jks
AndroidKeyaliasName: antearn
AndroidBuildApkPerCpuArchitecture: 0
AndroidTVCompatibility: 0
AndroidIsGame: 1
AndroidEnableTango: 0
androidEnableBanner: 1
androidUseLowAccuracyLocation: 0
androidUseCustomKeystore: 0
androidUseCustomKeystore: 1
m_AndroidBanners:
- width: 320
height: 180
......@@ -654,7 +654,8 @@ PlayerSettings:
webGLWasmStreaming: 0
scriptingDefineSymbols: {}
platformArchitecture: {}
scriptingBackend: {}
scriptingBackend:
Android: 0
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
......@@ -664,7 +665,8 @@ PlayerSettings:
gcIncremental: 1
assemblyVersionValidation: 1
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform: {}
apiCompatibilityLevelPerPlatform:
Android: 6
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: 2D_BuiltInRenderer
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment