Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
W
wdlc_mjb_unity
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
wdlc_mjb_unity
Commits
9b00e133
Commit
9b00e133
authored
Jul 01, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改广告问题
parent
a4d78bc0
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
11 deletions
+49
-11
AdManager.cs
Assets/Base/AdSDK/AD/AD_Manager/AdManager.cs
+27
-7
RewardVideoAd.cs
.../AD/GDT/UnionSDK/Scripts/iOS/RewardVideo/RewardVideoAd.cs
+1
-1
NativeExpressAd.cs
...GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
+1
-1
Bugly.framework.meta
Assets/Editor/XUPorter/Mods/Bugly/Bugly.framework.meta
+1
-1
AdUtils.cs
Assets/Game/Main/Scripts/Utils/AdUtils.cs
+10
-0
StartControl.cs
Assets/Scripts/StartControl.cs
+8
-0
PackageManagerSettings.asset
ProjectSettings/PackageManagerSettings.asset
+1
-1
No files found.
Assets/Base/AdSDK/AD/AD_Manager/AdManager.cs
View file @
9b00e133
...
...
@@ -117,7 +117,7 @@ public class AdManager
return
;
#endif
//穿山甲
if
(
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
null
&&
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
""
)
if
(
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
null
&&
ZXADConfig
.
Instance
.
CSJ_AD_APP_ID
!=
""
)
{
#if UNITY_ANDROID
...
...
@@ -153,7 +153,7 @@ public class AdManager
ZXHCADManager
.
Init
(
ZXADConfig
.
Instance
.
HC_AD_APP_ID
,
Constant
.
Instance
.
IsTestNet
);
#endif
}
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"ZXADConfig.Instance.HC_AD_APP_ID "
+
ZXADConfig
.
Instance
.
HC_AD_APP_ID
);
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"ZXADConfig.Instance.HC_AD_APP_ID "
+
ZXADConfig
.
Instance
.
HC_AD_APP_ID
);
//风行
#if UNITY_ANDROID
AndroidJavaClass
jc3
=
new
AndroidJavaClass
(
"com.ym.admodule.fs.FunShionManager"
);
...
...
@@ -206,7 +206,7 @@ public class AdManager
// listener.onError("code" + code + "没有默认配置 errMsg" + errMsg);
// listener.onLastError();
//}
listener
.
onError
(
code
+
"errormsg"
+
errMsg
);
listener
.
onError
(
code
+
"errormsg"
+
errMsg
);
listener
.
onLastError
();
}));
...
...
@@ -306,7 +306,7 @@ public class AdManager
CSJSplshADUtils
.
Instance
.
LoadSplshAd
(
entity
,
GetActivity
(),
GetSplashAdManager
(),
listener
,
callback
);
#elif UNITY_IOS
//加载穿山甲开屏广告
CSJSplshADUtils
.
Instance
.
LoadSplshAd
(
entity
,
null
,
null
,
listener
,
callback
);
CSJSplshADUtils
.
Instance
.
LoadSplshAd
(
entity
,
null
,
null
,
listener
,
callback
);
#endif
break
;
...
...
@@ -594,7 +594,7 @@ public class AdManager
if
(
bl
)
{
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"大图缓存成功 "
+
entity
.
adPlatform
+
" CodeID "
+
entity
.
codeId
);
//保存
插屏
缓存数据
//保存
大图
缓存数据
ZXADConfig
.
Instance
.
SetAdCache
(
sloatName
,
entity
,
""
);
}
else
...
...
@@ -850,7 +850,7 @@ public class AdManager
{
entity
.
actionName
=
actionName
;
ZXADConfig
.
Instance
.
RemoveAdCache
(
slotName
,
""
);
mPlayCacheInterstitialAdPlatform
(
entity
,
listener
,
new
Action
<
bool
>((
bl
)
=>
mPlayCacheInterstitialAdPlatform
(
entity
,
listener
,
new
Action
<
bool
>((
bl
)
=>
{
if
(
bl
)
{
...
...
@@ -885,7 +885,7 @@ public class AdManager
#if UNITY_ANDROID
case
ZXADConfig
.
PLANTFORM_AD_KUS
:
//快手插屏广告加载
KsInterstitialAdUtils
.
Instance
.
PlayCacheInterstitialAd
(
entity
,
callback
,
listener
);
KsInterstitialAdUtils
.
Instance
.
PlayCacheInterstitialAd
(
entity
,
callback
,
listener
);
break
;
#endif
default
:
...
...
@@ -1289,6 +1289,15 @@ public class AdManager
if
(
adList
==
null
||
adList
.
Count
==
0
)
{
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"激励视频A组没有数据"
);
ADLoading
.
Instance
().
loadFailCount
++;
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
return
;
}
if
(
IsFirstLoadRewardAd
)
...
...
@@ -1333,6 +1342,7 @@ public class AdManager
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
}
...
...
@@ -1353,6 +1363,15 @@ public class AdManager
if
(
adList
==
null
||
adList
.
Count
==
0
)
{
Debug
.
unityLogger
.
Log
(
ZXADConfig
.
ADManagerTAG
,
"激励视频B组没有数据"
);
ADLoading
.
Instance
().
loadFailCount
++;
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
return
;
}
List
<
AdEntity
>
totalEntityList
=
adList
;
...
...
@@ -1390,6 +1409,7 @@ public class AdManager
if
(
ADLoading
.
Instance
().
loadFailCount
==
2
)
{
ADLoading
.
Instance
().
HideADLoading
();
ADLoading
.
Instance
().
loadFailCount
=
0
;
}
}
...
...
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/RewardVideo/RewardVideoAd.cs
View file @
9b00e133
...
...
@@ -48,7 +48,7 @@ namespace Tencent.GDT
{
return
;
}
loadListeners
.
Add
((
int
)
rewardVideoAd
,
listener
)
;
loadListeners
[(
int
)
rewardVideoAd
]
=
listener
;
}
public
void
SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
)
...
...
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
View file @
9b00e133
...
...
@@ -49,7 +49,7 @@ namespace Tencent.GDT
{
return
;
}
loadListeners
.
Add
((
int
)
this
.
nativeExpressAd
,
listener
)
;
loadListeners
[(
int
)
this
.
nativeExpressAd
]
=
listener
;
}
public
void
LoadAd
(
int
count
)
...
...
Assets/Editor/XUPorter/Mods/Bugly/Bugly.framework.meta
View file @
9b00e133
...
...
@@ -48,7 +48,7 @@ PluginImporter:
second:
enabled: 0
settings:
CPU:
x86_64
CPU:
AnyCPU
- first:
Standalone: OSXUniversal
second:
...
...
Assets/Game/Main/Scripts/Utils/AdUtils.cs
View file @
9b00e133
...
...
@@ -67,6 +67,10 @@ public class AdUtils
public
void
onAdClose
(
AdEntity
entity
)
{
#if UNITY_IOS
Time
.
timeScale
=
1
;
#endif
Debug
.
Log
(
"音乐是否开关的值"
+
PlayerPrefs
.
GetInt
(
"IS_OPEN_MUSIC"
,
0
));
if
(
PlayerPrefs
.
GetInt
(
"IS_OPEN_MUSIC"
,
0
)
==
0
)
{
...
...
@@ -107,6 +111,9 @@ public class AdUtils
public
void
onAdShow
()
{
#if UNITY_IOS
Time
.
timeScale
=
0
;
#endif
AudioUtils
.
ins
.
music
.
Stop
();
EventUtils
.
OnEvent
(
"video_show"
);
...
...
@@ -212,6 +219,9 @@ public class AdUtils
public
void
onError
(
string
errorMsg
)
{
#if UNITY_IOS
Time
.
timeScale
=
1
;
#endif
callback
(
false
);
}
...
...
Assets/Scripts/StartControl.cs
View file @
9b00e133
...
...
@@ -203,6 +203,9 @@ public class StartControl : MonoBehaviour
int
passTime
=
curTime
-
lastCloseTime
;
if
(
passTime
>
Constant
.
Instance
.
splash_time
&&
passTime
<
Constant
.
Instance
.
video_time
)
{
#if UNITY_IOS
ShowSplashAd
();
#else
if
(
AdUtils
.
IsShowRewardAd
)
{
AdUtils
.
IsShowRewardAd
=
false
;
...
...
@@ -211,9 +214,13 @@ public class StartControl : MonoBehaviour
{
ShowSplashAd
();
}
#endif
}
else
if
(
passTime
>=
Constant
.
Instance
.
video_time
)
{
#if UNITY_IOS
ShowRewardAd
();
#else
if
(
AdUtils
.
IsShowRewardAd
)
{
AdUtils
.
IsShowRewardAd
=
false
;
...
...
@@ -222,6 +229,7 @@ public class StartControl : MonoBehaviour
{
ShowRewardAd
();
}
#endif
}
}
...
...
ProjectSettings/PackageManagerSettings.asset
View file @
9b00e133
...
...
@@ -17,7 +17,7 @@ MonoBehaviour:
m_Registries
:
-
m_Id
:
main
m_Name
:
m_Url
:
https://packages.unity.c
n
m_Url
:
https://packages.unity.c
om
m_Scopes
:
[]
m_IsDefault
:
1
m_UserSelectedRegistryName
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment