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
1fdd0589
Commit
1fdd0589
authored
Jul 19, 2021
by
zhangzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iOS修改
parent
92b33759
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
167 additions
and
43 deletions
+167
-43
CSJFeedUtil.cs
Assets/Base/AdSDK/AD/CSJ/CSJFeedUtil.cs
+46
-10
GDTFeedAdUtil.cs
Assets/Base/AdSDK/AD/GDT/GDTFeedAdUtil.cs
+1
-0
GDTInterstitialAdUtil.cs
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
+1
-0
UnifiedInterstitialAd.cs
...SDK/Scripts/iOS/InstitialVideoAd/UnifiedInterstitialAd.cs
+9
-0
NativeExpressAd.cs
...GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
+9
-0
InitScene.unity
Assets/Base/InitScene.unity
+3
-3
Icon.meta
Assets/Game/Main/Resource/Icon.meta
+0
-8
csc_icon.jpg
Assets/Game/Main/Resource/ui/logo/csc_icon.jpg
+0
-0
csc_icon.jpg.meta
Assets/Game/Main/Resource/ui/logo/csc_icon.jpg.meta
+0
-0
开屏页-ios.jpg
Assets/Game/Main/Resource/ui/logo/开屏页-ios.jpg
+0
-0
开屏页-ios.jpg.meta
Assets/Game/Main/Resource/ui/logo/开屏页-ios.jpg.meta
+92
-0
Guide.cs
Assets/Game/Main/Scripts/Utils/Guide.cs
+1
-0
DialogControl.cs
Assets/Game/Main/Scripts/View/DialogControl.cs
+1
-17
Splash.unity
Assets/Game/Splash/Splash.unity
+1
-1
Splash.cs
Assets/Scripts/Splash/Splash.cs
+1
-1
GraphicsSettings.asset
ProjectSettings/GraphicsSettings.asset
+0
-1
PackageManagerSettings.asset
ProjectSettings/PackageManagerSettings.asset
+1
-1
ProjectSettings.asset
ProjectSettings/ProjectSettings.asset
+1
-1
No files found.
Assets/Base/AdSDK/AD/CSJ/CSJFeedUtil.cs
View file @
1fdd0589
...
...
@@ -84,10 +84,25 @@ public class CSJFeedUtil : MonoBehaviour
lastCallBack
=
callback
;
Debug
.
Log
(
"设备机型: "
+
SystemInfo
.
deviceModel
);
#if UNITY_IOS
int
ImageAcceptedWidth
;
// Screen.width在iPhone8p上获取的不对
if
(
SystemInfo
.
deviceModel
==
"iPhone10,2"
||
SystemInfo
.
deviceModel
==
"iPhone10,5"
)
{
ImageAcceptedWidth
=
1242
;
}
else
{
ImageAcceptedWidth
=
Screen
.
width
;
}
#endif
var
adSlot
=
new
AdSlot
.
Builder
()
#if UNITY_IOS
.
SetCodeId
(
entity
.
codeId
)
.
SetImageAcceptedSize
(
Screen
.
w
idth
,
0
)
.
SetImageAcceptedSize
(
ImageAcceptedW
idth
,
0
)
#else
.
SetCodeId
(
entity
.
codeId
)
////期望模板广告view的size,单位dp,//高度设置为0,则高度会自适应
...
...
@@ -98,7 +113,7 @@ public class CSJFeedUtil : MonoBehaviour
.
SetOrientation
(
AdOrientation
.
Horizontal
)
.
SetAdCount
(
1
)
//请求广告数量为1到3条
.
Build
();
this
.
AdNative
.
LoadNativeExpressAd
(
adSlot
,
new
FeedAdListener
(
entity
,
callback
));
this
.
AdNative
.
LoadNativeExpressAd
(
adSlot
,
new
FeedAdListener
(
entity
,
callback
));
}
//FeedAd IOS 和 Android 相同
...
...
@@ -116,7 +131,7 @@ public class CSJFeedUtil : MonoBehaviour
/// 展示缓存的FeedAd
/// </summary>
/// <param name="entity"></param>
public
void
ShowCacheFeedAd
(
AdEntity
entity
,
Action
<
bool
>
callback
)
public
void
ShowCacheFeedAd
(
AdEntity
entity
,
Action
<
bool
>
callback
)
{
#if UNITY_ANDROID
CloseFeedAd
();
...
...
@@ -125,8 +140,29 @@ public class CSJFeedUtil : MonoBehaviour
{
feedAd
=
feedAdCacheList
.
Dequeue
();
#if UNITY_IOS
int
width
;
// Screen.width在iPhone8p上获取的不对
if
(
SystemInfo
.
deviceModel
==
"iPhone10,2"
||
SystemInfo
.
deviceModel
==
"iPhone10,5"
)
{
width
=
1242
;
}
else
{
width
=
Screen
.
width
;
}
int
height
;
// Screen.height在iPhone8p上获取的不对
if
(
SystemInfo
.
deviceModel
==
"iPhone10,2"
||
SystemInfo
.
deviceModel
==
"iPhone10,5"
)
{
height
=
2208
;
}
else
{
height
=
Screen
.
height
;
}
float
x
=
0
;
float
y
=
Screen
.
height
-
(
Screen
.
width
*
275.5f
/
375
)
-
(
IsX
?
45
:
0
);
float
y
=
height
-
(
width
*
275.5f
/
375
)
-
(
IsX
?
45
:
0
);
//if (y == 0)
//{
// y = 100; // 防止Demo里刘海遮挡
...
...
@@ -153,7 +189,7 @@ public class CSJFeedUtil : MonoBehaviour
{
private
AdEntity
entity
;
private
Action
<
bool
>
callback
;
public
FeedAdListener
(
AdEntity
entity
,
Action
<
bool
>
callback
)
public
FeedAdListener
(
AdEntity
entity
,
Action
<
bool
>
callback
)
{
this
.
entity
=
entity
;
this
.
callback
=
callback
;
...
...
@@ -161,7 +197,7 @@ public class CSJFeedUtil : MonoBehaviour
public
void
OnError
(
int
code
,
string
message
)
{
EventUtils
.
onEventPullFail
(
entity
,
code
.
ToString
(),
message
);
EventUtils
.
onEventPullFail
(
entity
,
code
.
ToString
(),
message
);
callback
(
false
);
}
...
...
@@ -211,7 +247,7 @@ public class CSJFeedUtil : MonoBehaviour
public
void
OnExpressAdLoad
(
List
<
ExpressAd
>
ads
)
{
}
#if UNITY_IOS
public
void
OnExpressBannerAdLoad
(
ExpressBannerAd
ad
)
...
...
@@ -255,7 +291,7 @@ public class CSJFeedUtil : MonoBehaviour
Debug
.
Log
(
"express OnAdShow,type:"
+
type
);
EventUtils
.
onEventShowSuccess
(
entity
);
callback
(
true
);
}
public
void
OnAdViewRenderError
(
ExpressAd
ad
,
int
code
,
string
message
)
...
...
@@ -263,7 +299,7 @@ public class CSJFeedUtil : MonoBehaviour
Debug
.
Log
(
"express OnAdViewRenderError,type:"
+
type
);
EventUtils
.
onEventShowFail
(
entity
);
callback
(
false
);
}
public
void
OnAdViewRenderSucc
(
ExpressAd
ad
,
float
width
,
float
height
)
...
...
@@ -274,7 +310,7 @@ public class CSJFeedUtil : MonoBehaviour
{
Debug
.
Log
(
"express OnAdClose,type:"
+
type
);
EventUtils
.
onEventAdComplete
(
entity
);
}
public
void
onAdRemoved
(
ExpressAd
ad
)
{
...
...
Assets/Base/AdSDK/AD/GDT/GDTFeedAdUtil.cs
View file @
1fdd0589
...
...
@@ -42,6 +42,7 @@ public class GDTFeedAdUtil
NativeExpressAd
ad
=
new
NativeExpressAd
(
entity
.
codeId
,
GetAdSize
());
nativeExpressAd
=
ad
;
ad
.
SetEnableDefaultAudioSessionSetting
(
false
);
ad
.
SetListener
(
new
FeedAdListener
(
entity
,
callback
));
ad
.
LoadAd
(
1
);
}
...
...
Assets/Base/AdSDK/AD/GDT/GDTInterstitialAdUtil.cs
View file @
1fdd0589
...
...
@@ -39,6 +39,7 @@ public class GDTInterstitialAdUtil
//string posId = Constants.intersititialNoVideoPosId;//不带视频的插屏广告测试Id
UnifiedInterstitialAd
ad
=
new
UnifiedInterstitialAd
(
entity
.
codeId
);
ad
.
SetEnableDefaultAudioSessionSetting
(
false
);
ad
.
SetListener
(
new
UnifiedInterstitialAdListener
(
entity
,
ad
,
null
,
callback
));
ad
.
LoadAd
();
}
...
...
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/InstitialVideoAd/UnifiedInterstitialAd.cs
View file @
1fdd0589
...
...
@@ -678,6 +678,15 @@ namespace Tencent.GDT
}
});
}
[
DllImport
(
"__Internal"
)]
private
static
extern
void
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
);
public
void
SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
)
{
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
audioSessionSetting
);
}
}
#endif
}
Assets/Base/AdSDK/AD/GDT/UnionSDK/Scripts/iOS/nativeexpress/NativeExpressAd.cs
View file @
1fdd0589
...
...
@@ -543,6 +543,15 @@ namespace Tencent.GDT
}
});
}
[
DllImport
(
"__Internal"
)]
private
static
extern
void
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
);
public
void
SetEnableDefaultAudioSessionSetting
(
bool
audioSessionSetting
)
{
GDT_UnionPlatform_RewardVideoAd_SetEnableDefaultAudioSessionSetting
(
audioSessionSetting
);
}
}
#endif
}
Assets/Base/InitScene.unity
View file @
1fdd0589
...
...
@@ -382,8 +382,8 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
788e2a3a769e26b459cd63d4a5de7d76
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
isTest
:
0
isShowLog
:
0
isTest
:
1
isShowLog
:
1
XyDialog
:
{
fileID
:
0
}
---
!u!1
&2010092450
GameObject
:
...
...
@@ -441,7 +441,7 @@ MonoBehaviour:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_Sprite
:
{
fileID
:
21300000
,
guid
:
e5d6b9eed3a874a0397c699b5154addb
,
type
:
3
}
m_Sprite
:
{
fileID
:
21300000
,
guid
:
5ea045535c25e4c96a220073f19049c1
,
type
:
3
}
m_Type
:
0
m_PreserveAspect
:
0
m_FillCenter
:
1
...
...
Assets/Game/Main/Resource/Icon.meta
deleted
100644 → 0
View file @
92b33759
fileFormatVersion: 2
guid: feed25f3a4ce64a1596f99926c2d825e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Resource/
Icon
/csc_icon.jpg
→
Assets/Game/Main/Resource/
ui/logo
/csc_icon.jpg
View file @
1fdd0589
File moved
Assets/Game/Main/Resource/
Icon
/csc_icon.jpg.meta
→
Assets/Game/Main/Resource/
ui/logo
/csc_icon.jpg.meta
View file @
1fdd0589
File moved
Assets/Game/Main/Resource/ui/logo/开屏页-ios.jpg
0 → 100644
View file @
1fdd0589
78.3 KB
Assets/Game/Main/Resource/ui/logo/开屏页-ios.jpg.meta
0 → 100644
View file @
1fdd0589
fileFormatVersion: 2
guid: 5ea045535c25e4c96a220073f19049c1
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
Assets/Game/Main/Scripts/Utils/Guide.cs
View file @
1fdd0589
...
...
@@ -118,6 +118,7 @@ public class Guide : MonoBehaviour
}
PlayerDataControl
.
Instance
.
IsNewUser
=
isUser
;
PlayerPrefs
.
SetInt
(
"DidFinishedNewUserGuide"
,
isUser
?
0
:
1
);
isStartShow
=
true
;
IsNewUser
=
isUser
;
DissmissGuide
(
false
);
...
...
Assets/Game/Main/Scripts/View/DialogControl.cs
View file @
1fdd0589
...
...
@@ -511,15 +511,7 @@ public class DialogControl : MonoBehaviour
}
private
void
moveDiamondDialog
()
{
#if UNITY_IOS
diamondcontent
.
GetComponent
<
RectTransform
>().
anchorMin
=
new
Vector2
(
0.5f
,
0.5f
);
diamondcontent
.
GetComponent
<
RectTransform
>().
anchorMax
=
new
Vector2
(
0.5f
,
0.5f
);
diamondcontent
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
new
Vector3
(
0
,
100
,
0
);
diamondcontent
.
transform
.
parent
.
Find
(
"CloseImage"
).
gameObject
.
SetActive
(
false
);
#else
diamondcontent
.
transform
.
localPosition
+=
new
Vector3
(
0
,
340
,
0
);
#endif
}
//关闭获取钻石弹窗
public
void
closeDiamondDialog
()
...
...
@@ -620,15 +612,7 @@ public class DialogControl : MonoBehaviour
}
private
void
moveAllSpeedDialog
()
{
#if UNITY_IOS
allspeedcontent
.
GetComponent
<
RectTransform
>().
anchorMin
=
new
Vector2
(
0.5f
,
0.5f
);
allspeedcontent
.
GetComponent
<
RectTransform
>().
anchorMax
=
new
Vector2
(
0.5f
,
0.5f
);
allspeedcontent
.
GetComponent
<
RectTransform
>().
anchoredPosition
=
new
Vector3
(
0
,
100
,
0
);
allspeedcontent
.
transform
.
parent
.
Find
(
"CloseImage"
).
gameObject
.
SetActive
(
false
);
#else
allspeedcontent
.
transform
.
localPosition
+=
new
Vector3
(
0
,
320
,
0
);
#endif
}
private
void
showAd
()
{
...
...
@@ -1513,7 +1497,7 @@ public class DialogControl : MonoBehaviour
/// </summary>
private
void
moveHarvestHongBao
()
{
transform
.
Find
(
"HarvestHongBao/BgImage"
).
localPosition
=
new
Vector3
(
0
,
3
7
0
,
0
);
transform
.
Find
(
"HarvestHongBao/BgImage"
).
localPosition
=
new
Vector3
(
0
,
3
2
0
,
0
);
}
/// <summary>
...
...
Assets/Game/Splash/Splash.unity
View file @
1fdd0589
...
...
@@ -1513,7 +1513,7 @@ MonoBehaviour:
m_OnCullStateChanged
:
m_PersistentCalls
:
m_Calls
:
[]
m_Sprite
:
{
fileID
:
21300000
,
guid
:
e5d6b9eed3a874a0397c699b5154addb
,
type
:
3
}
m_Sprite
:
{
fileID
:
21300000
,
guid
:
5ea045535c25e4c96a220073f19049c1
,
type
:
3
}
m_Type
:
0
m_PreserveAspect
:
0
m_FillCenter
:
1
...
...
Assets/Scripts/Splash/Splash.cs
View file @
1fdd0589
...
...
@@ -90,7 +90,7 @@ public class Splash : MonoBehaviour
{
Constant
.
Instance
.
shubiao
=
false
;
}
Constant
.
Instance
.
shubiao
=
true
;
//
Constant.Instance.shubiao = true;
novelInfo
();
}),
new
Action
<
string
,
string
>((
code
,
errMsg
)
=>
{
...
...
ProjectSettings/GraphicsSettings.asset
View file @
1fdd0589
...
...
@@ -34,7 +34,6 @@ GraphicsSettings:
-
{
fileID
:
16000
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
16001
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
17000
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
-
{
fileID
:
16003
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
m_PreloadedShaders
:
[]
m_SpritesDefaultMaterial
:
{
fileID
:
10754
,
guid
:
0000000000000000f000000000000000
,
type
:
0
}
...
...
ProjectSettings/PackageManagerSettings.asset
View file @
1fdd0589
...
...
@@ -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
:
...
...
ProjectSettings/ProjectSettings.asset
View file @
1fdd0589
...
...
@@ -270,7 +270,7 @@ PlayerSettings:
-
m_BuildTarget
:
m_Icons
:
-
serializedVersion
:
2
m_Icon
:
{
fileID
:
2800000
,
guid
:
43004d061e5444c07a12e464fc3a7e20
,
type
:
3
}
m_Icon
:
{
fileID
:
2800000
,
guid
:
354f3646ee72b417eb1bbc40e7f70be3
,
type
:
3
}
m_Width
:
128
m_Height
:
128
m_Kind
:
0
...
...
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