Compare commits

...

31 Commits

Author SHA1 Message Date
juncong lee c22019fc71 修复报错问题 2025-10-23 17:26:12 +08:00
juncong lee ff7044f79c 修复kwai报错问题 2025-10-23 13:43:51 +08:00
juncong lee 88918b8691 使用topon初始化kwai广告 2025-10-22 13:55:29 +08:00
luojian f218790d71 topon kwai 初始化 2025-10-22 10:14:54 +08:00
玉峰 5bef448ae2 1.0.4.9 2025-10-20 14:42:38 +08:00
玉峰 269ccbf47e EFSDK打点 2025-10-20 14:39:44 +08:00
luojian 4214568c7b 1.0.4.8 2025-10-20 13:38:21 +08:00
luojian d453b7b73d native 多次调用show的定时刷新问题 2025-10-20 13:35:35 +08:00
juncong lee 7af1810cf9 后调用kwai 2025-10-17 19:31:25 +08:00
玉峰 8e17b3eedd 版本记录 2025-10-17 10:42:05 +08:00
玉峰 188f0dfd8d 更新EFSDK:小组件功能 2025-10-17 10:37:41 +08:00
玉峰 a38a9ef29e 更新小组件SDK 2025-10-16 10:35:37 +08:00
玉峰 dd15489b43 编辑器状态下return 2025-10-15 17:51:28 +08:00
玉峰 587ec681ac 小组件接口 2025-10-15 16:31:43 +08:00
玉峰 6e137ef330 小组件 2025-10-15 16:26:52 +08:00
juncong lee 0fea646a5c kwai初始化问题修复 2025-10-11 12:26:28 +08:00
juncong lee b7f47c29b5 修复未初始化广告SDK前调用isready广告接口报错问题 2025-10-10 20:58:03 +08:00
juncong lee f57d9f8b7a 通过在线参数控制是由topon初始化kwai还是自初始化 2025-09-29 16:25:54 +08:00
juncong lee aeec8953f6 升级版本号 2025-09-28 10:46:59 +08:00
juncong lee d952b7126b admobID从配置文件读取 2025-09-28 10:03:20 +08:00
juncong lee 6d0bdbd4da 增加admobloading收益打点 2025-09-25 15:37:55 +08:00
juncong lee 80c7f251c6 修复admob获取不到价格/比价不展示广告问题 2025-09-25 13:55:15 +08:00
luojian 1a4641f788 改变获取的 属性值 2025-09-25 13:37:51 +08:00
luojian 71478c926d 更新admob获取的堆栈 2025-09-25 11:33:54 +08:00
luojian 5e6e7f32cb 兼容两个版本获取admob价格 2025-09-25 10:20:26 +08:00
juncong lee da1e02b790 升级版本号 2025-09-24 17:48:45 +08:00
juncong lee 4314e5ff75 Merge branch 'main' of http://v4.9ms.co:7777/yufeng/SDK_UnityMoney 2025-09-24 17:47:31 +08:00
juncong lee 3bcbb66f1f 修复admob GetResponseInfo为空的问题 2025-09-24 17:47:05 +08:00
玉峰 84d04c51df GetSSAccountId返回“” 2025-09-24 17:43:44 +08:00
玉峰 03232ee99f 更新推送SDK 2025-09-23 19:34:24 +08:00
玉峰 afd3a5c9c0 if else换行
插屏
2025-09-22 20:24:53 +08:00
93 changed files with 3929 additions and 500 deletions

5
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"recommendations": [
"visualstudiotoolsforunity.vstuc"
]
}

10
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity",
"type": "vstuc",
"request": "attach"
}
]
}

56
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,56 @@
{
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.gitmodules": true,
"**/*.booproj": true,
"**/*.pidb": true,
"**/*.suo": true,
"**/*.user": true,
"**/*.userprefs": true,
"**/*.unityproj": true,
"**/*.dll": true,
"**/*.exe": true,
"**/*.pdf": true,
"**/*.mid": true,
"**/*.midi": true,
"**/*.wav": true,
"**/*.gif": true,
"**/*.ico": true,
"**/*.jpg": true,
"**/*.jpeg": true,
"**/*.png": true,
"**/*.psd": true,
"**/*.tga": true,
"**/*.tif": true,
"**/*.tiff": true,
"**/*.3ds": true,
"**/*.3DS": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.lxo": true,
"**/*.LXO": true,
"**/*.ma": true,
"**/*.MA": true,
"**/*.obj": true,
"**/*.OBJ": true,
"**/*.asset": true,
"**/*.cubemap": true,
"**/*.flare": true,
"**/*.mat": true,
"**/*.meta": true,
"**/*.prefab": true,
"**/*.unity": true,
"build/": true,
"Build/": true,
"Library/": true,
"library/": true,
"obj/": true,
"Obj/": true,
"ProjectSettings/": true,
"temp/": true,
"Temp/": true
},
"dotnet.defaultSolution": "SDK_UnityMoney.sln",
"git.ignoreLimitWarning": true
}

View File

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 280 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 22d4b822110d1bd43932b2b737f61dce
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 63a7e60d370bb1c48a1138e45315d8aa
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: a8e21c257c84fda4189e3fed8c70f5bf
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 9cb4efb8034485741852541144c5a7a0
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: bbc3d4b96ecfd6a4ba5369f9bce4af83
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 9934c44d94c1030438702e646cc1a5b1
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 80bd20381adc2bd4e9618ef94f172637
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 9cfb6b46fea6c7845999842064fef0dd
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: aa07182c81a5b6b4aac5efad02e407fa
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: a0fa3d13d2c47b64c8a10c49839f888c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 10def9eb660635b468ed7fc2277a4e6f
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: f2d7efc9e85a47e98bae42a19e1d52a3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: a8d31fbeeee87204e88e6c444284262e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 4886e0d9173712146b255852a9672dfe
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 213035b3454d9394598755a9d193e711
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: aacf2638ee9d7ef4d86faa3688b8ff67
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
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
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9cb4efb8034485741852541144c5a7a0
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9934c44d94c1030438702e646cc1a5b1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 9cfb6b46fea6c7845999842064fef0dd
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: a0fa3d13d2c47b64c8a10c49839f888c
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 10def9eb660635b468ed7fc2277a4e6f
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: f2d7efc9e85a47e98bae42a19e1d52a3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -32,8 +32,8 @@ namespace EFSDK
public EFSdk()
{
Debug.Log($"GetNewSDKClass():{GetNewSDKClass()}");
Debug.Log($"initSDK():{ GenerateAndroidName("initSDK")}");
Debug.Log($"initSDK():{GenerateAndroidName("initSDK")}");
// java interface class
using (AndroidJavaClass jc = new AndroidJavaClass(GetNewSDKClass()))
{
@ -46,7 +46,7 @@ namespace EFSDK
private static string GetNewSDKClass()
{
return GetSDKPackage() + GenerateAndroidName(oriSDK);
return GetSDKPackage() + GenerateAndroidName(oriSDK);
}
private static string GetSDKPackage()
@ -61,8 +61,9 @@ namespace EFSDK
string newPName = "";
for (int i = 0; i < parts2.Length; i++)
{
newPName+=parts2[i]+".";
newPName += parts2[i] + ".";
}
return newPName;
}
@ -97,6 +98,7 @@ namespace EFSDK
{
sub = "a" + sub;
}
return sub;
}
@ -180,7 +182,7 @@ namespace EFSDK
SDKCall("initSDK", mappingInfo);
ActionCallback?.Invoke(ActionType.SDK_INIT_Succ, string.Empty);
}
/// <summary>
/// 当游戏进程启动之后,可以接收响应的时候(一般在游戏内事件上报相关内容初始化完毕调用即可,参数传true),调用这个方法通知SDK,
/// SDK收到通知后会开始将SDK侧的事件回传给游戏,作事件上报
@ -267,6 +269,27 @@ namespace EFSDK
#region
/// <summary>
/// 启用v2版本常驻通知样式
/// </summary>
/// <param name="enable">rue:启用v2版本常驻通知样式false:禁用 (禁用将使用V1版本常驻通知样式)</param>
public void EnablePersistentStyleV2(bool enable)
{
SDKCall("enablePersistentStyleV2", enable);
}
/// <summary>
/// 设置v2版本常驻通知的文案
/// </summary>
/// <param name="text1">图标 1 文案</param>
/// <param name="text2">图标 2 文案</param>
/// <param name="text3">图标 3 文案</param>
/// <param name="text4">图标 4 文案</param>
public void SetPersistentStyleV2Text(string text1, string text2, string text3, string text4)
{
SDKCall("setPersistentStyleV2Text", text1, text2, text3, text4);
}
/// <summary>
/// 满足条件:未领取 R0.1 的 买量用户, 调用这个方法
/// </summary>
@ -426,5 +449,66 @@ namespace EFSDK
}
#endregion
#region
public enum WidgetType
{
Widget3X2 = 1,
Widget5X1 = 2,
}
/// <summary>
/// 获取指定类型的小组件是否已添加到桌面
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public bool IsWidgetAdded(WidgetType type)
{
return SDKCall<bool>("isWidgetAdded", (int)type);
}
public Action<bool> actionRequestAddWidgetResult = null;
/// <summary>
/// 将指定类型的小组件添加到桌面(小组件采用默认样式)
/// </summary>
/// <param name="type"></param>
/// <param name="action">小组件添加结果回调</param>
/// <returns></returns>
public void RequestAddWidget(WidgetType type, Action<bool> action)
{
actionRequestAddWidgetResult = action;
SDKCall("requestAddWidget", (int)type);
}
/// <summary>
/// 请求将Widget3X2添加到桌面,并自定义文案
/// </summary>
/// <param name="title1">标题1文案</param>
/// <param name="title2">标题2文案</param>
/// <param name="progressStr">进度条上的文案</param>
/// <param name="buttonStr">按钮的文案</param>
/// <param name="action">小组件添加结果回调</param>
public void RequestAddWidget3x2(string title1, string title2, string progressStr, string buttonStr,
Action<bool> action)
{
actionRequestAddWidgetResult = action;
SDKCall("requestAddWidget3x2", title1, title2, progressStr, buttonStr);
}
/// <summary>
/// 请求将 Widget5X1 添加到桌面,并自定义文案
/// </summary>
/// <param name="content">内容文案</param>
/// <param name="action">小组件添加结果回调</param>
/// <param name="contentTextColor">文案文字十六进制颜色值,如: #FFFFFF</param>
public void RequestAddWidget5x1(string content, Action<bool> action, string contentTextColor = "#FFFFFF")
{
actionRequestAddWidgetResult = action;
SDKCall("requestAddWidget5x1", content, contentTextColor);
}
#endregion
}
}
}

View File

@ -9,6 +9,8 @@ namespace EFSDK
private string H5_Load_Succ = "H5_Load_Succ";
private string On_Resume = "onResume";
private string Can_Goback = "canGoback";
private string reqNotifyPermission = "reqNotifyPermission";
private string REQUEST_ADD_WIDGET_RESULT = "requestAddWidgetResult";
public void OnReceiverAnd(string message)
{
@ -31,11 +33,17 @@ namespace EFSDK
EFSdk.get().ActionCallback?.Invoke(EFSdk.ActionType.H5_Load_Succ, parts[1]);
}
if (message.StartsWith("reqNotifyPermission#"))
if (message.StartsWith(reqNotifyPermission))
{
string[] flag = message.Split('#');
EFSdk.get().mReqNotifyPermissionAction?.Invoke(flag[1].Equals("1"));
}
if (message.StartsWith(REQUEST_ADD_WIDGET_RESULT))
{
string[] flag = message.Split('#');
EFSdk.get().actionRequestAddWidgetResult?.Invoke(flag[2].Equals("true"));
}
if (message.StartsWith("Event#"))
{

View File

@ -15,6 +15,15 @@ namespace EFSDK
private static readonly string TempDir = "Temp/AndroidResAar";
private static readonly string EFSdk_FILE = "Assets/EFSDK/EFSdk.cs";
[MenuItem("EFSDK/构建当前包名的推送SDK")]
public static void BuildPushSdk()
{
Debug.Log($"当前包名: {Application.identifier}");
string result = SDKEditorNetworkTool.HttpGetText(
$"http://v4.9ms.co:58080/generic-webhook-trigger/invoke?token=pushsdk&target_package_name={Application.identifier}");
Debug.Log($"{result}\n成功发起推送SDK构建请求,请稍等3分钟之后,重新打包即可");
}
[MenuItem("EFSDK/Build Android Res AAR")]
public static void BuildAAR()
{
@ -43,7 +52,7 @@ namespace EFSDK
if (File.Exists(aarPath)) File.Delete(aarPath);
IOCompression.ZipFile.CreateFromDirectory(TempDir, aarPath, IOCompression.CompressionLevel.Optimal, false);
Debug.Log($"✅ AAR built: {aarPath}");
Debug.Log($"✅ AAR built:"+aarPath);
// 生成压缩 JSON (key 只保留文件名)
Dictionary<string, string> simpleMapping = new Dictionary<string, string>();
@ -59,6 +68,7 @@ namespace EFSDK
// 映射文件
string mappingPath = Path.Combine(TempDir, "res_mapping.json");
File.WriteAllText(mappingPath, mappingJson);
Debug.Log($"✅ AAR 资源文件构建成功! mappingJson:"+mappingJson);
// 清理临时目录
Directory.Delete(TempDir, true);
@ -86,8 +96,8 @@ namespace EFSDK
string key = Path.GetFileNameWithoutExtension(relativePath); // 可以保留目录信息
string value = string.IsNullOrEmpty(relativeDir) ? newName : $"{relativeDir}/{newName}";
string fileNameWithoutExt = Path.GetFileNameWithoutExtension(value);
mapping[key] = fileNameWithoutExt;
// mapping[key] = fileNameWithoutExt;
mapping.Add(key, fileNameWithoutExt);
// 目标路径
string dstPath = Path.Combine(dstDir, value.Replace("/", Path.DirectorySeparatorChar.ToString()));
@ -131,7 +141,14 @@ namespace EFSDK
{
string ext = Path.GetExtension(filePath);
string oriFileName = Path.GetFileNameWithoutExtension(filePath);
if (filePath.EndsWith(".9.png"))
{
ext = ".9.png";
oriFileName = Path.GetFileName(filePath).Replace(".9.png","");
}
string md5Str = GetFirstEightWithUnderscore(GetMD5Hash(Application.identifier + oriFileName + oriFileName));
Debug.Log($"原名:{oriFileName} 后缀:{ext} 生成文件名:{md5Str + ext}");
return md5Str + ext;
}

View File

@ -25,6 +25,7 @@ public class DynamicApplicationClass : IPostGenerateGradleAndroidProject
androidManifest.Save();
SetGradleConstraints(path);
FixedAddressValueTypeAttribute(path);
// 仅测试使用
// ParseConfigFile(path);
}

View File

@ -1,4 +1,6 @@
using System;
using System.Net;
using System.Text;
using UnityEngine;
using UnityEngine.Networking;
@ -42,4 +44,22 @@ public class SDKEditorNetworkTool
return "";
}
public static string HttpGetText(string url)
{
try
{
using (WebClient client = new WebClient())
{
client.Encoding = Encoding.UTF8;
return client.DownloadString(url);
}
}
catch (Exception e)
{
UnityEngine.Debug.LogError($"[NetworkTool] Exception: {e}");
return "";
}
}
}

View File

@ -119,21 +119,21 @@ public class ManifestProcessor : IPreprocessBuild
}
GoogleMobileAdsSettings instance = GoogleMobileAdsSettings.LoadInstance();
string appId = instance.GoogleMobileAdsAndroidAppId;
// string appId = instance.GoogleMobileAdsAndroidAppId;
if (appId.Length == 0)
{
StopBuildWithMessage(
"Android Google Mobile Ads app ID is empty. Please enter a valid app ID to run ads properly.");
}
// if (appId.Length == 0)
// {
// StopBuildWithMessage(
// "Android Google Mobile Ads app ID is empty. Please enter a valid app ID to run ads properly.");
// }
IEnumerable<XElement> metas = elemApplication.Descendants()
.Where( elem => elem.Name.LocalName.Equals("meta-data"));
SetMetadataElement(elemApplication,
metas,
METADATA_APPLICATION_ID,
appId);
// SetMetadataElement(elemApplication,
// metas,
// METADATA_APPLICATION_ID,
// appId);
SetMetadataElement(elemApplication,
metas,

View File

@ -4,6 +4,7 @@ using BigoAds.Scripts.Platforms.Android;
using KwaiAds.Scripts.Api;
using KwaiAds.Scripts.Common;
using UnityEngine;
using WZ;
namespace KwaiAds.Scripts.Platforms.Android
{
@ -126,7 +127,10 @@ namespace KwaiAds.Scripts.Platforms.Android
{
AndroidJavaObject contextObject = currentActivity.Call<AndroidJavaObject>("getApplicationContext");
Debug.Log("Android Context: " + contextObject.Call<string>("toString"));
kwaiAdSdkClass.CallStatic("init", contextObject, sdkConfigBuilder.Call<AndroidJavaObject>("build"));
if (!KwaiAdsManager.UseToponInitKwai())
{
kwaiAdSdkClass.CallStatic("init", contextObject, sdkConfigBuilder.Call<AndroidJavaObject>("build"));
}
}
else
{

View File

@ -147,6 +147,7 @@ namespace KwaiAds.Scripts.Platforms.Android
public void onAdLoadSuccess(string trackId, AndroidJavaObject kwaiInterstitialAd)
{
if (string.IsNullOrEmpty(trackId) || kwaiInterstitialAd == null || _InterstitialAdLoadListener == null) return;
_KwaiInterstitialAdController._KwaiInterstitialAd = kwaiInterstitialAd;
string price = kwaiInterstitialAd.Call<string>("getPrice");
Debug.Log($"{TAG}: onAdLoaded: {kwaiInterstitialAd.Call<string>("getPrice")}");

View File

@ -134,6 +134,7 @@ namespace KwaiAds.Scripts.Platforms.Android
{
this._RewardAdLoadListener = rewardAdListener;
this._KwaiRewardAdController = kwaiRewardAdController;
Debug.Log("yangwu AdLoadListener:"+rewardAdListener+" kwaiRewardAdController:"+kwaiRewardAdController);
}
public void onAdLoadStart(string trackId)
@ -147,6 +148,7 @@ namespace KwaiAds.Scripts.Platforms.Android
public void onAdLoadSuccess(string trackId, AndroidJavaObject kwaiRewardAd)
{
if (string.IsNullOrEmpty(trackId) || kwaiRewardAd == null || _KwaiRewardAdController == null) return;
_KwaiRewardAdController._KwaiRewardAd = kwaiRewardAd;
string price = kwaiRewardAd.Call<string>("getPrice");
Debug.Log($"{TAG}: onAdLoaded: {kwaiRewardAd.Call<string>("getPrice")}");

View File

@ -163,7 +163,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
var metaDataElements = elementApplication.Descendants().Where(element => element.Name.LocalName.Equals("meta-data"));
EnableVerboseLoggingIfNeeded(elementApplication);
AddGoogleApplicationIdIfNeeded(elementApplication, metaDataElements);
//AddGoogleApplicationIdIfNeeded(elementApplication, metaDataElements);
AddGoogleOptimizationFlagsIfNeeded(elementApplication, metaDataElements);
DisableAutoInitIfNeeded(elementApplication, metaDataElements);
RemoveSdkKeyIfNeeded(metaDataElements);

View File

@ -100,7 +100,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
var sdkKey = AppLovinSettings.Instance.SdkKey;
if (string.IsNullOrEmpty(sdkKey))
{
MaxSdkLogger.UserError("Failed to install AppLovin Quality Service plugin. SDK Key is empty. Please enter the AppLovin SDK Key in the Integration Manager.");
//MaxSdkLogger.UserError("Failed to install AppLovin Quality Service plugin. SDK Key is empty. Please enter the AppLovin SDK Key in the Integration Manager.");
return;
}
@ -109,7 +109,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
var apiKey = qualityServiceData.api_key;
if (string.IsNullOrEmpty(apiKey))
{
MaxSdkLogger.UserError("Failed to install AppLovin Quality Service plugin. API Key is empty.");
//MaxSdkLogger.UserError("Failed to install AppLovin Quality Service plugin. API Key is empty.");
return;
}

View File

@ -1,2 +1,33 @@
fileFormatVersion: 2
guid: fe8f127008b0843c3a9e8e549d63e21d
guid: fe8f127008b0843c3a9e8e549d63e21d
folderAsset: yes
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Android: Android
second:
enabled: 1
settings: {}
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,14 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This Google Mobile Ads plugin library manifest will get merged with your
application's manifest, adding the necessary metadata
required for displaying ads.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.unity.ads">
<uses-sdk android:minSdkVersion="23"/>
<uses-permission android:name="android.permission.INTERNET"/>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.unity.ads">
<uses-sdk android:minSdkVersion="23" />
<uses-permission android:name="android.permission.INTERNET" />
<application>
<uses-library android:required="false" android:name="org.apache.http.legacy"/>
<uses-library android:required="false" android:name="org.apache.http.legacy" />
<meta-data android:name="com.google.unity.ads.UNITY_VERSION" android:value="2022.3.62f1c1" />
</application>
</manifest>
</manifest>

Binary file not shown.

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 22d4b822110d1bd43932b2b737f61dce
guid: c65192b2b5ecc4e4fa2d6620d2ac05fe
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -503,7 +503,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -317, y: 0}
m_AnchoredPosition: {x: -77, y: 295}
m_SizeDelta: {x: 160, y: 81.78}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &231270964
@ -670,7 +670,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Native1Show
m_Text: "\u9690\u85CF\u6298\u53E0"
--- !u!222 &317264882
CanvasRenderer:
m_ObjectHideFlags: 0
@ -812,6 +812,85 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 339569235}
m_CullTransparentMesh: 1
--- !u!1 &354948052
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 354948053}
- component: {fileID: 354948055}
- component: {fileID: 354948054}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &354948053
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 354948052}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1284311697}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &354948054
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 354948052}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: InitSDK
--- !u!222 &354948055
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 354948052}
m_CullTransparentMesh: 1
--- !u!1 &519420028
GameObject:
m_ObjectHideFlags: 0
@ -904,6 +983,139 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &522373770
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 522373771}
- component: {fileID: 522373774}
- component: {fileID: 522373773}
- component: {fileID: 522373772}
m_Layer: 5
m_Name: Button-topon-IsInit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &522373771
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 522373770}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1467558789}
m_Father: {fileID: 1332931146}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160, y: 81.78003}
m_Pivot: {x: 0, y: 1}
--- !u!114 &522373772
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 522373770}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 522373773}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1332931147}
m_TargetAssemblyTypeName: Test, Assembly-CSharp
m_MethodName: ToponKwaiIsInit
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &522373773
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 522373770}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &522373774
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 522373770}
m_CullTransparentMesh: 1
--- !u!1 &522908628
GameObject:
m_ObjectHideFlags: 0
@ -974,7 +1186,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u63D2\u5C4F"
m_Text: "\u6298\u53E0banner"
--- !u!222 &522908631
CanvasRenderer:
m_ObjectHideFlags: 0
@ -1231,7 +1443,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -108, y: -123.51}
m_AnchoredPosition: {x: 121, y: 297}
m_SizeDelta: {x: 160, y: 81.78}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &988501506
@ -1989,7 +2201,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -317, y: -238}
m_AnchoredPosition: {x: -78, y: 168}
m_SizeDelta: {x: 160, y: 81.78}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1238066088
@ -2165,6 +2377,139 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1263400539}
m_CullTransparentMesh: 1
--- !u!1 &1284311696
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1284311697}
- component: {fileID: 1284311700}
- component: {fileID: 1284311699}
- component: {fileID: 1284311698}
m_Layer: 5
m_Name: Button-topon-Init
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1284311697
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284311696}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 354948053}
m_Father: {fileID: 1332931146}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 245, y: 0}
m_SizeDelta: {x: 160, y: 81.78003}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1284311698
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284311696}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1284311699}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 1332931147}
m_TargetAssemblyTypeName: Test, Assembly-CSharp
m_MethodName: ToponKwaiInitSDK
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &1284311699
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284311696}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!222 &1284311700
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1284311696}
m_CullTransparentMesh: 1
--- !u!1 &1332931142
GameObject:
m_ObjectHideFlags: 0
@ -2273,6 +2618,8 @@ RectTransform:
- {fileID: 339569236}
- {fileID: 5579540}
- {fileID: 1601333711}
- {fileID: 522373771}
- {fileID: 1284311697}
- {fileID: 1979832641}
- {fileID: 1439137377}
m_Father: {fileID: 0}
@ -2390,7 +2737,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1439137377
RectTransform:
m_ObjectHideFlags: 0
@ -2448,6 +2795,85 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1439137376}
m_CullTransparentMesh: 1
--- !u!1 &1467558788
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1467558789}
- component: {fileID: 1467558791}
- component: {fileID: 1467558790}
m_Layer: 5
m_Name: Text (Legacy)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1467558789
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1467558788}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 522373771}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1467558790
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1467558788}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Topon Is Init
--- !u!222 &1467558791
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1467558788}
m_CullTransparentMesh: 1
--- !u!1 &1560301798
GameObject:
m_ObjectHideFlags: 0
@ -2484,7 +2910,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -108, y: 0}
m_AnchoredPosition: {x: 118, y: 174}
m_SizeDelta: {x: 160, y: 81.78}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1560301800
@ -2863,7 +3289,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u6FC0\u52B1"
m_Text: "\u666E\u901Abanner"
--- !u!222 &1715967760
CanvasRenderer:
m_ObjectHideFlags: 0
@ -2942,7 +3368,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Native1Hide
m_Text: "\u9690\u85CF\u666E\u901A"
--- !u!222 &1839779890
CanvasRenderer:
m_ObjectHideFlags: 0
@ -3047,7 +3473,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &1979832641
RectTransform:
m_ObjectHideFlags: 0

View File

@ -19,7 +19,7 @@ namespace WZ
string bundleId = GetBundleId();
LoggerUtils.Debug("[FileParse] get bundleId: " + bundleId);
ParseConfig(bundleId);
ParseSdkConfig(bundleId);
// ParseSdkConfig(bundleId);
}
// 获取key-value配置信息

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 63a7e60d370bb1c48a1138e45315d8aa
guid: 725371b12142d45e7b38d6fe93bd61e8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,157 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
using Google.MiniJSON;
using UnityEditor;
using UnityEditor.Android;
using UnityEditor.Build;
using UnityEngine;
#if UNITY_ANDROID
namespace WZ
{
public class Android : IPostGenerateGradleAndroidProject
{
public int callbackOrder => int.MaxValue;
public void OnPostGenerateGradleAndroidProject(string path)
{
#if UNITY_2019_3_OR_NEWER
AddAdmobAppId(path);
#endif
}
private void AddAdmobAppId(string path)
{
var appManifestPath = Path.Combine(path, "src/main/AndroidManifest.xml");
var manifestFile = new XmlDocument();
manifestFile.Load(appManifestPath);
const string gmsAdsApplicationID = "com.google.android.gms.ads.APPLICATION_ID";
var admobAppId = GetMetaDataValue(manifestFile, gmsAdsApplicationID);
var projectAdmobAppId = GetAdmobAppId();
LoggerUtils.Debug("Get admob id:"+projectAdmobAppId);
if (string.IsNullOrEmpty(admobAppId))
{
AddMetaDataValue(manifestFile, gmsAdsApplicationID, projectAdmobAppId);
}
else
{
UpdateMetaDataValue(manifestFile, gmsAdsApplicationID, projectAdmobAppId);
}
var androidManifestFileArray = EditorFileUtils.GetAllFileWhereSuffix(path, "AndroidManifest.xml");
foreach (var tempPath in androidManifestFileArray)
{
var newText = File.ReadAllText(tempPath).Replace("INSERT_YOUR_ADMOB_APP_ID_HERE", projectAdmobAppId);
File.WriteAllText(tempPath, newText);
}
const string OPTIMIZE_INITIALIZATION = "com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION";
var optimizeInitialization = GetMetaDataValue(manifestFile, OPTIMIZE_INITIALIZATION);
if (string.IsNullOrEmpty(optimizeInitialization))
{
AddMetaDataValue(manifestFile, OPTIMIZE_INITIALIZATION, "true");
}
else
{
UpdateMetaDataValue(manifestFile, OPTIMIZE_INITIALIZATION, "true");
}
const string OPTIMIZE_AD_LOADING = "com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING";
var optimizeAdLoading = GetMetaDataValue(manifestFile, OPTIMIZE_AD_LOADING);
if (string.IsNullOrEmpty(optimizeAdLoading))
{
AddMetaDataValue(manifestFile, OPTIMIZE_AD_LOADING, "true");
}
else
{
UpdateMetaDataValue(manifestFile, OPTIMIZE_AD_LOADING, "true");
}
manifestFile.Save(appManifestPath);
if (string.IsNullOrEmpty(projectAdmobAppId))
{
// 显示错误提示框
EditorUtility.DisplayDialog("Error", "Google advertising channel was used, but admobId was not configured in the configuration file.", "Ok");
throw new Exception("Google advertising channel was used, but admobId was not configured in the configuration file.");
}
}
private bool UpdateMetaDataValue(XmlDocument manifest, string name, string value)
{
var xpath = $"/manifest/application/meta-data[@android:name='{name}']";
var node = manifest.DocumentElement?.SelectSingleNode(xpath, GetNamespaceManager(manifest));
if (!(node is XmlElement element)) return false;
var attributeNode = element.GetAttributeNode("android:value");
if (attributeNode != null)
{
attributeNode.Value = value;
}
return false;
}
private bool AddMetaDataValue(XmlDocument manifest, string name, string value)
{
var metaNode = manifest.CreateElement("meta-data");
var nameAttribute = manifest.CreateAttribute("android", "name", "http://schemas.android.com/apk/res/android");
nameAttribute.InnerText = name;
metaNode.SetAttributeNode(nameAttribute);
var valueAttribute = manifest.CreateAttribute("android", "value", "http://schemas.android.com/apk/res/android");
valueAttribute.InnerText = value;
metaNode.SetAttributeNode(valueAttribute);
var applicationNode = manifest.SelectSingleNode("/manifest/application");
if (applicationNode == null) return false;
applicationNode.AppendChild(metaNode);
return true;
}
private static string GetAdmobAppId()
{
return FileParse.GetConfigByKey(FileParse.KEY_Admob_AppID);
}
private static string GetMetaDataValue(XmlDocument manifest, string name)
{
var xpath = $"/manifest/application/meta-data[@android:name='{name}']";
var node = manifest.DocumentElement?.SelectSingleNode(xpath, GetNamespaceManager(manifest));
if (node is XmlElement element)
{
return element.GetAttribute("android:value");
}
return "";
}
private static XmlNamespaceManager GetNamespaceManager(XmlDocument manifest)
{
var namespaceManager = new XmlNamespaceManager(manifest.NameTable);
namespaceManager.AddNamespace("android", "http://schemas.android.com/apk/res/android");
return namespaceManager;
}
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 049fe3d95026b4c5c88ebf67e55687b4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -186,6 +186,7 @@ namespace WZ
public bool IsInterstitialAvailable()
{
if (!_initialized || _interstitialAdUnits.Count == 0) return false;
return _admobInterstitialAdManager.GetAvailableAdUnits().Count > 0;
}
@ -321,7 +322,7 @@ namespace WZ
public bool IsNativeAvailable(string adUnitId)
{
return _admobNativeAdManager.IsAdAvailable(adUnitId);
return _admobNativeAdManager?.IsAdAvailable(adUnitId) ?? false;
}
public void DisplayNative(string _adPos, string adUnitId, NativeAdPosition position)
@ -414,12 +415,12 @@ namespace WZ
#endregion
#region
public void TrackAdImpression(AdapterResponseInfo loadedAdapterResponseInfo, AdValue adValue, AdsType type, string placement)
public void TrackAdImpression(string adsourceName,string adSourceInstanceName, AdValue adValue, AdsType type, string placement)
{
AdjustTrackEvent.Instance.TrackAdEvent(adValue.Value / 1000000f,
loadedAdapterResponseInfo.AdSourceName,
adsourceName,
placement,
loadedAdapterResponseInfo.AdSourceInstanceName);
adSourceInstanceName);
var position = type switch
{
@ -430,7 +431,7 @@ namespace WZ
};
FireBaseAnalyticsManager.Instance.OnAdRevenueEvent(PlatformType.Admob.ToString(),
loadedAdapterResponseInfo.AdSourceName,
adsourceName,
placement,
type,
adValue.Value / 1000000f,
@ -438,7 +439,7 @@ namespace WZ
AdPlayCountManager.GetAdsActionCount(type, AdPlayCountManager.PLAY_COUNT_SUFFIX));
ShuShuEvent.Instance.OnAdRevenueEvent(PlatformType.Admob.ToString(),
loadedAdapterResponseInfo.AdSourceName,
adsourceName,
placement,
type.ToString(),
adValue.Value / 1000000f,

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using GoogleMobileAds.Api;
namespace WZ
@ -56,15 +57,24 @@ namespace WZ
}
LoggerUtils.Debug("Admob Interstitial ad loaded with response : " + ad.GetResponseInfo().ToString());
LoggerUtils.Debug("Admob Interstitial ad loaded with Getsrevenue:"+AdmobUtils.GetInterstitialAdEcpm(ad));
_interstitialAds[adUnitId] = ad;
_adRevenueCache[adUnitId] = AdmobUtils.GetInterstitialAdEcpm(ad);
AdsKeyEvents.Instance.LogAdFPUEvents(AdsType.Interstitial);
onAdLoaded?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
onAdLoaded?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId);
AdsActionEvents.TrackAdmobValue(PlatformType.Admob,
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Interstitial,
AdmobUtils.GetInterstitialAdEcpm(ad));
ad.OnAdPaid += (AdValue adValue) =>
{
LoggerUtils.Debug(String.Format("[Admob] Interstitial ad paid {0} {1}.", adValue.Value, adValue.CurrencyCode));
AdmobAdsManager.Instance.TrackAdImpression(ad.GetResponseInfo().GetLoadedAdapterResponseInfo(),
AdmobAdsManager.Instance.TrackAdImpression(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo().AdSourceName ??"",
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo().AdSourceInstanceId ??"",
adValue,
AdsType.Interstitial,
adUnitId);
@ -80,7 +90,7 @@ namespace WZ
ad.OnAdClicked += () =>
{
LoggerUtils.Debug("[Admob] Interstitial ad was clicked.");
onAdClicked?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
onAdClicked?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdmobUtils.GetInterstitialAdEcpm(ad));
};
@ -94,7 +104,9 @@ namespace WZ
ad.OnAdFullScreenContentClosed += () =>
{
LoggerUtils.Debug("[Admob] Interstitial ad full screen content closed.");
onAdDismissed?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName, adUnitId, AdmobUtils.GetInterstitialAdEcpm(ad));
onAdDismissed?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdmobUtils.GetInterstitialAdEcpm(ad));
};
ad.OnAdFullScreenContentFailed += (AdError error) =>
@ -157,23 +169,11 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = -1;
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (IsAdAvailable(adUnitId) && revenue > highestRevenue)
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
return _adRevenueCache
.Where(kvp => IsAdAvailable(kvp.Key))
.OrderByDescending(kvp => kvp.Value)
.Select(kvp => kvp.Key)
.FirstOrDefault();
}
// 获取价格最高的广告收益信息
@ -185,7 +185,7 @@ namespace WZ
{
return revenue;
}
return 0;
return -1;
}
// 清理资源

View File

@ -27,6 +27,7 @@ namespace WZ
private Dictionary<string, int> _retryCounters = new Dictionary<string, int>();
private Dictionary<string, float> _adStartLoadTimes = new Dictionary<string, float>();
private Dictionary<string, ShowNativePosition> showingNativeAds = new();
private Dictionary<string, bool> TimingRefreshDict = new();
public void InitializeAdUnits(List<string> adUnitIds)
{
@ -76,7 +77,7 @@ namespace WZ
var adSource = "";
if (ad != null)
{
adSource = ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName;
adSource = ad.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "";
}
var reason = "";
@ -118,10 +119,17 @@ namespace WZ
}
AdsActionEvents.TrackAdLoaded(PlatformType.Admob,
ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Native,
Time.realtimeSinceStartup - _adStartLoadTimes[adUnitId]);
AdsActionEvents.TrackAdmobValue(PlatformType.Admob,
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Native,
AdmobUtils.GetNativeEcpm(ad));
_retryCounters[adUnitId] = 0;
@ -136,7 +144,8 @@ namespace WZ
ad.OnAdPaid += (AdValue adValue) =>
{
LoggerUtils.Debug($"[Admob] Native ad paid {adValue.Value} {adValue.CurrencyCode}.");
AdmobAdsManager.Instance.TrackAdImpression(ad.GetResponseInfo().GetLoadedAdapterResponseInfo(),
AdmobAdsManager.Instance.TrackAdImpression(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo().AdSourceName ?? "",
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo().AdSourceInstanceId ?? "",
adValue,
AdsType.Native,
adUnitId);
@ -147,7 +156,7 @@ namespace WZ
ad.OnAdClicked += () =>
{
AdsActionEvents.TrackAdClicked(PlatformType.Admob,
ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Native,
"",
@ -160,7 +169,7 @@ namespace WZ
ad.OnAdFullScreenContentClosed += () =>
{
AdsActionEvents.TrackAdClicked(PlatformType.Admob,
ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Native,
"",
@ -267,6 +276,16 @@ namespace WZ
private void TimingRefresh(string adUnitId)
{
// 同一个id只允许触发一次定时刷新。 避免多次调用show ,多次来触发刷新
if (TimingRefreshDict.TryGetValue(adUnitId, out var timingRefresh))
{
if (timingRefresh)
{
LoggerUtils.Debug($"[Admob] Native ad ({adUnitId}) timing refresh finished. 正在刷新中.不用重复刷新.");
return;
}
}
var nativeReflashGap = int.Parse(FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("Native_Reflash_Gap", "0"));
if (nativeReflashGap <= 0)
@ -287,10 +306,15 @@ namespace WZ
return;
}
LoggerUtils.Debug($"[Admob] Native ad ({adUnitId}) timing refresh start. nativeReflashGap = {nativeReflashGap}");
TimingRefreshDict.AddIfNotExists(adUnitId, true);
WLoom.QueueOnMainThread(o =>
{
var refreshAdUnitId = (string)o;
LoggerUtils.Debug($"[Admob] Native ad ({adUnitId}) timing refresh load start refreshAdUnitId : {refreshAdUnitId}.");
var remove = TimingRefreshDict.Remove(refreshAdUnitId);
LoggerUtils.Debug($"[Admob] Native ad ({adUnitId}) timing refresh load start refreshAdUnitId : {refreshAdUnitId}. TimingRefreshDict.Remove = {remove}");
if (showingNativeAds.ContainsKey(refreshAdUnitId))
{
LoadAd(refreshAdUnitId, true);
@ -323,24 +347,11 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = -1;
LoggerUtils.Debug($"[Admob] Native ad GetHighestPayingAdUnit {_adRevenueCache.Count}");
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (IsAdAvailable(adUnitId) && revenue > highestRevenue)
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
return _adRevenueCache
.Where(kvp => IsAdAvailable(kvp.Key))
.OrderByDescending(kvp => kvp.Value)
.Select(kvp => kvp.Key)
.FirstOrDefault();
}
// 获取价格最高的广告收益信息
@ -353,7 +364,7 @@ namespace WZ
return revenue;
}
return 0;
return -1;
}
// 获取广告收益信息

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using GoogleMobileAds.Api;
@ -51,7 +52,7 @@ namespace WZ
return;
}
LoggerUtils.Debug("[Admob] rewarded ad loaded with response : " + ad.GetResponseInfo().ToString()+"revenue:"+AdmobUtils.GetRewardedAdEcpm(ad));
LoggerUtils.Debug("[Admob] rewarded ad loaded with response : " + ad.GetResponseInfo().ToString());
LoggerUtils.Debug("[Admob] rewarded ad revenue : " +AdmobUtils.GetRewardedAdEcpm(ad));
if (!AdmobAdsManager.Instance.FindAdsID(AdsType.Rewarded, adUnitId))
@ -64,13 +65,20 @@ namespace WZ
AdsKeyEvents.Instance.LogAdFPUEvents(AdsType.Rewarded);
onAdLoaded?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
onAdLoaded?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId);
AdsActionEvents.TrackAdmobValue(PlatformType.Admob,
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Rewarded,
AdmobUtils.GetRewardedAdEcpm(ad));
ad.OnAdPaid += (AdValue adValue) =>
{
LoggerUtils.Debug(String.Format("[Admob] rewarded ad paid {0} {1}.", adValue.Value, adValue.CurrencyCode));
AdmobAdsManager.Instance.TrackAdImpression(ad.GetResponseInfo().GetLoadedAdapterResponseInfo(),
AdmobAdsManager.Instance.TrackAdImpression(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceInstanceId ?? "",
adValue,
AdsType.Rewarded,
adUnitId);
@ -85,7 +93,7 @@ namespace WZ
ad.OnAdClicked += () =>
{
LoggerUtils.Debug("[Admob] rewarded ad was clicked.");
onAdClicked?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
onAdClicked?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdmobUtils.GetRewardedAdEcpm(ad));
};
@ -99,7 +107,7 @@ namespace WZ
ad.OnAdFullScreenContentClosed += () =>
{
LoggerUtils.Debug("[Admob] rewarded ad full screen content closed.");
onAdDismissed?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName, adUnitId, AdmobUtils.GetRewardedAdEcpm(ad));
onAdDismissed?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "", adUnitId, AdmobUtils.GetRewardedAdEcpm(ad));
};
ad.OnAdFullScreenContentFailed += (AdError error) =>
@ -157,23 +165,11 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = -1;
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (IsAdAvailable(adUnitId) && revenue > highestRevenue)
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
return _adRevenueCache
.Where(kvp => IsAdAvailable(kvp.Key))
.OrderByDescending(kvp => kvp.Value)
.Select(kvp => kvp.Key)
.FirstOrDefault();
}
// 获取价格最高的广告收益信息

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using GoogleMobileAds.Api;
using UnityEngine;
@ -52,18 +53,25 @@ namespace WZ
return;
}
LoggerUtils.Debug("[Admob] appopen ad loaded with response : " + ad.GetResponseInfo().ToString()+" revenue:"+AdmobUtils.GetAppOpenAdEcpm(ad));
LoggerUtils.Debug("[Admob] appopen ad loaded with response : " + ad.GetResponseInfo().ToString());
LoggerUtils.Debug("[Admob] appopen ad loaded with revenue : " + AdmobUtils.GetAppOpenAdEcpm(ad));
_appOpenAds[adUnitId] = ad;
_adRevenueCache[adUnitId] = AdmobUtils.GetAppOpenAdEcpm(ad);
AdsKeyEvents.Instance.LogAdFPUEvents(AdsType.Splash);
onAdLoaded?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
onAdLoaded?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId);
AdsActionEvents.TrackAdmobValue(PlatformType.Admob,
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Splash,
AdmobUtils.GetAppOpenAdEcpm(ad));
ad.OnAdPaid += (AdValue adValue) =>
{
LoggerUtils.Debug(String.Format("[Admob] appopen ad paid {0} {1}.", adValue.Value, adValue.CurrencyCode));
AdmobAdsManager.Instance.TrackAdImpression(ad.GetResponseInfo().GetLoadedAdapterResponseInfo(),
AdmobAdsManager.Instance.TrackAdImpression(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceInstanceId ?? "",
adValue,
AdsType.Splash,
adUnitId);
@ -78,7 +86,7 @@ namespace WZ
ad.OnAdClicked += () =>
{
LoggerUtils.Debug("[Admob] appopen ad was clicked.");
onAdClicked?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
onAdClicked?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdmobUtils.GetAppOpenAdEcpm(ad));
};
@ -92,7 +100,7 @@ namespace WZ
ad.OnAdFullScreenContentClosed += () =>
{
LoggerUtils.Debug("[Admob] appopen ad full screen content closed.");
onAdDismissed?.Invoke(ad.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
onAdDismissed?.Invoke(ad?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdmobUtils.GetAppOpenAdEcpm(ad));
};
@ -148,22 +156,11 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = 0;
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (IsAdAvailable(adUnitId))
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
return _adRevenueCache
.Where(kvp => IsAdAvailable(kvp.Key))
.OrderByDescending(kvp => kvp.Value)
.Select(kvp => kvp.Key)
.FirstOrDefault();
}
// 获取价格最高的广告收益信息
@ -175,7 +172,7 @@ namespace WZ
{
return revenue;
}
return 0;
return -1;
}
// 清理资源

View File

@ -2,6 +2,7 @@ using System.Collections.Generic;
using GoogleMobileAds.Api;
using System;
using UnityEngine;
using System.Linq;
namespace WZ
{
@ -43,13 +44,20 @@ namespace WZ
{
_retryCounters[adUnitId] = 0;
_adRevenueCache[adUnitId] = AdmobUtils.GetBannerEcpm(bannerAds);
LoggerUtils.Debug($"[Admob] banner -[Load]: {adUnitId} successfully");
LoggerUtils.Debug($"[Admob] banner -[Load]: {adUnitId} successfully, ecpm = {AdmobUtils.GetBannerEcpm(bannerAds)}");
AdsActionEvents.TrackAdLoaded(AdmobAdsManager.Instance.Platfrom,
bannerAds.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Banner,
Time.realtimeSinceStartup - (_adStartLoadTimes.TryGetValue(adUnitId, out var time)? time : 0));
Time.realtimeSinceStartup - (_adStartLoadTimes.TryGetValue(adUnitId, out var time) ? time : 0));
AdsKeyEvents.Instance.LogAdFPUEvents(AdsType.Banner);
AdsActionEvents.TrackAdmobValue(PlatformType.Admob,
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Banner,
AdmobUtils.GetBannerEcpm(bannerAds));
};
bannerAds.OnBannerAdLoadFailed += ((msg) =>
@ -58,12 +66,16 @@ namespace WZ
{
_retryCounters[adUnitId]++;
}
double retryDelay = Math.Pow(2, Math.Min(6, _retryCounters[adUnitId]));
double retryDelay = Math.Pow(2, Math.Min(6, _retryCounters.TryGetValue(adUnitId,out var times)? times : 0));
LoggerUtils.Debug($"[Admob] banner -[Load]: {adUnitId} failed, error message = {msg}");
// 延迟重试加载
_loadCallbacks[adUnitId] = () => LoadAd(adUnitId);
TimerUtils.Instance.DelayExecute((float)retryDelay, () => _loadCallbacks[adUnitId]?.Invoke());
_loadCallbacks.TryGetValue(adUnitId, out Action _loadCallback);
if (_loadCallback != null)
{
TimerUtils.Instance.DelayExecute((float)retryDelay, () => _loadCallback?.Invoke());
}
AdsActionEvents.TrackAdFailToLoad(AdmobAdsManager.Instance.Platfrom,
"",
"",
@ -74,7 +86,8 @@ namespace WZ
bannerAds.OnAdPaid += ((adValue) =>
{
LoggerUtils.Debug($"[Admob] banner -[interaction]: {adUnitId} show");
AdmobAdsManager.Instance.TrackAdImpression(bannerAds.GetResponseInfo().GetLoadedAdapterResponseInfo(),
AdmobAdsManager.Instance.TrackAdImpression(bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo().AdSourceName ?? "",
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo().AdSourceInstanceId ?? "",
adValue,
AdsType.Banner,
adUnitId);
@ -83,7 +96,7 @@ namespace WZ
bannerAds.OnAdClicked += () =>
{
AdsActionEvents.TrackAdClicked(AdmobAdsManager.Instance.Platfrom,
bannerAds.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Banner,
"",
@ -125,7 +138,6 @@ namespace WZ
{
return;
}
if (_bannerAds.TryGetValue(adUnitId, out var ad))
{
ad.SetPosition(bannerAlignType == BannerAlignType.CenterBottom ? AdPosition.Bottom : AdPosition.Top);
@ -158,23 +170,8 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = -1;
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (revenue > highestRevenue)
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
if (_adRevenueCache.Count == 0) return null;
return _adRevenueCache.OrderByDescending(kvp => kvp.Value).First().Key;
}
// 获取价格最高的广告收益信息
@ -205,7 +202,7 @@ namespace WZ
public void ClearAds(string[] adUnitIds)
{
// 将数组转换为HashSet以提高查找性能
HashSet<string> validKeys = new HashSet<string>(adUnitIds);
HashSet<string> validKeys = new HashSet<string>(adUnitIds);
// 收集需要移除的key
List<string> keysToRemove = new List<string>();

View File

@ -2,6 +2,7 @@ using System.Collections.Generic;
using GoogleMobileAds.Api;
using System;
using UnityEngine;
using System.Linq;
namespace WZ
{
@ -43,13 +44,20 @@ namespace WZ
{
_retryCounters[adUnitId] = 0;
_adRevenueCache[adUnitId] = AdmobUtils.GetBannerEcpm(bannerAds);
LoggerUtils.Debug($"[Admob] banner collapsible -[Load]: {adUnitId} successfully iscollapsible: {bannerAds.IsCollapsible()}");
LoggerUtils.Debug($"[Admob] banner collapsible -[Load]: {adUnitId} successfully iscollapsible: {bannerAds.IsCollapsible()},ecpm: {AdmobUtils.GetBannerEcpm(bannerAds)}");
AdsActionEvents.TrackAdLoaded(AdmobAdsManager.Instance.Platfrom,
bannerAds.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Banner,
Time.realtimeSinceStartup - (_adStartLoadTimes.TryGetValue(adUnitId, out var time)? time : 0));
Time.realtimeSinceStartup - (_adStartLoadTimes.TryGetValue(adUnitId, out var time) ? time : 0));
AdsKeyEvents.Instance.LogAdFPUEvents(AdsType.Banner);
AdsActionEvents.TrackAdmobValue(PlatformType.Admob,
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Banner,
AdmobUtils.GetBannerEcpm(bannerAds));
};
bannerAds.OnBannerAdLoadFailed += ((msg) =>
@ -58,12 +66,16 @@ namespace WZ
{
_retryCounters[adUnitId]++;
}
double retryDelay = Math.Pow(2, Math.Min(6, _retryCounters[adUnitId]));
double retryDelay = Math.Pow(2, Math.Min(6, _retryCounters.TryGetValue(adUnitId,out var times)? times : 0));
LoggerUtils.Debug($"[Admob] banner collapsible -[Load]: {adUnitId} failed, error message = {msg}");
// 延迟重试加载
_loadCallbacks[adUnitId] = () => LoadAd(adUnitId);
TimerUtils.Instance.DelayExecute((float)retryDelay, () => _loadCallbacks[adUnitId]?.Invoke());
_loadCallbacks.TryGetValue(adUnitId, out Action _loadCallback);
if (_loadCallback != null)
{
TimerUtils.Instance.DelayExecute((float)retryDelay, () => _loadCallback?.Invoke());
}
AdsActionEvents.TrackAdFailToLoad(AdmobAdsManager.Instance.Platfrom,
"",
"",
@ -74,7 +86,8 @@ namespace WZ
bannerAds.OnAdPaid += ((adValue) =>
{
LoggerUtils.Debug($"[Admob] banner collapsible -[interaction]: {adUnitId} show");
AdmobAdsManager.Instance.TrackAdImpression(bannerAds.GetResponseInfo().GetLoadedAdapterResponseInfo(),
AdmobAdsManager.Instance.TrackAdImpression(bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceInstanceId ?? "",
adValue,
AdsType.Banner,
adUnitId);
@ -83,7 +96,7 @@ namespace WZ
bannerAds.OnAdClicked += () =>
{
AdsActionEvents.TrackAdClicked(AdmobAdsManager.Instance.Platfrom,
bannerAds.GetResponseInfo().GetLoadedAdapterResponseInfo().AdSourceName,
bannerAds?.GetResponseInfo()?.GetLoadedAdapterResponseInfo()?.AdSourceName ?? "",
adUnitId,
AdsType.Banner,
"",
@ -94,7 +107,7 @@ namespace WZ
public void LoadAd(string adUnitId)
{
if (!AdmobAdsManager.Instance.FindAdsID(AdsType.Banner, adUnitId,BannerType.Collapsible))
if (!AdmobAdsManager.Instance.FindAdsID(AdsType.Banner, adUnitId, BannerType.Collapsible))
{
return;
}
@ -163,23 +176,8 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = -1;
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (revenue > highestRevenue)
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
if (_adRevenueCache.Count == 0) return null;
return _adRevenueCache.OrderByDescending(kvp => kvp.Value).First().Key;
}
// 获取价格最高的广告收益信息

View File

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using GoogleMobileAds.Api;
@ -7,77 +8,234 @@ using Newtonsoft.Json.Linq;
namespace WZ
{
public class AdmobUtils
abstract class IStack
{
public static string ParseResponseInfo(ResponseInfo responseInfo)
{
string pubid = "";
public abstract string GetStackName();
protected abstract string[] GetBannerStack();
protected abstract string[] GetSpStack();
protected abstract string[] GetIvStack();
protected abstract string[] GetRvStack();
protected abstract string[] GetNaStack();
public abstract string GetFiledName();
try
public string[] GetStackFromName(string stackName)
{
return stackName switch
{
string responseInfoJson = responseInfo.ToString();
JObject responseInfoObj = JObject.Parse(responseInfoJson);
JToken loadedAdapterResponse = responseInfoObj["Response Extras"];
if (loadedAdapterResponse != null)
{
pubid = loadedAdapterResponse["mediation_group_name"]?.ToString();
}
}
catch
{
}
return pubid;
"BannerStack" => GetBannerStack(),
"SpStack" => GetSpStack(),
"IvStack" => GetIvStack(),
"RvStack" => GetRvStack(),
"NaStack" => GetNaStack(),
_ => Array.Empty<string>()
};
}
}
public static double GetBannerEcpm(BannerView bannerView)
{
return GetEcpm(bannerView, "bannerView", "adView", BannerStack);
}
public static double GetRewardedAdEcpm(RewardedAd rewardedAd)
{
return GetEcpm(rewardedAd, "androidRewardedAd", "rewardedAd", RvStack);
}
public static double GetInterstitialAdEcpm(InterstitialAd interstitialAd)
{
return GetEcpm(interstitialAd, "androidInterstitialAd", "interstitialAd", IvStack);
}
public static double GetAppOpenAdEcpm(AppOpenAd appOpenAd)
{
return GetEcpm(appOpenAd, "androidAppOpenAd", "appOpenAd", SpStack);
}
public static double GetNativeEcpm(NativeOverlayAd ad)
{
return GetEcpm(ad, "nativeOverlayAd", "nativeAd", NaStack);
}
private static double GetEcpm(object o, string cShapeFieldName, string javaFieldName, string[] stack)
{
try
{
return GetEcpm(GetAdValue(GetJavaAdViewOjb(o, cShapeFieldName, javaFieldName), stack));
}
catch (Exception e)
{
LoggerUtils.Error("[AdmobTools] e : " + e.Message + "\t cShapeFieldName : " + cShapeFieldName);
}
return -1;
}
internal class Stack1 : IStack
{
private static readonly string[] BannerStack = { "zza", "zzj", "zzi", "zze", "zza", "zzk", "zzae" };
private static readonly string[] SpStack = { "zzb", "zza", "zzc", "zza", "zzk", "zzae" };
private static readonly string[] IvStack = { "zzc", "zzj", "zzf", "zzd", "zzae" };
private static readonly string[] RvStack = { "zzb", "zzi", "zze", "zze", "zzae" };
private static readonly string[] NaStack = { "zza", "zzb", "zzf", "zzD", "zzb", "zzae" };
public override string GetStackName()
{
return "Stack1";
}
protected override string[] GetBannerStack()
{
return BannerStack;
}
protected override string[] GetSpStack()
{
return SpStack;
}
protected override string[] GetIvStack()
{
return IvStack;
}
protected override string[] GetRvStack()
{
return RvStack;
}
protected override string[] GetNaStack()
{
return NaStack;
}
public override string GetFiledName()
{
return "zzd";
}
}
internal class Stack2 : IStack
{
private static readonly string[] BannerStack = { "zza", "zzj", "zza", "a", "a", "f", "a", "e", "ae" };
private static readonly string[] SpStack = { "zzb", "zza", "a", "a", "a", "e", "ae" };
private static readonly string[] IvStack = { "zzc", "zza", "a", "a", "d", "d", "ae" };
private static readonly string[] RvStack = { "zzb", "zza", "b", "g", "e", "ae" };
private static readonly string[] NaStack = { "zza", "zza", "b", "d", "c", "ae" };
public override string GetStackName()
{
return "Stack2";
}
protected override string[] GetBannerStack()
{
return BannerStack;
}
protected override string[] GetSpStack()
{
return SpStack;
}
protected override string[] GetIvStack()
{
return IvStack;
}
protected override string[] GetRvStack()
{
return RvStack;
}
protected override string[] GetNaStack()
{
return NaStack;
}
public override string GetFiledName()
{
return "d";
}
}
internal class EmptyStack : IStack
{
public override string GetStackName()
{
return "EmptyStack";
}
protected override string[] GetBannerStack()
{
return Array.Empty<string>();
}
protected override string[] GetSpStack()
{
return Array.Empty<string>();
}
protected override string[] GetIvStack()
{
return Array.Empty<string>();
}
protected override string[] GetRvStack()
{
return Array.Empty<string>();
}
protected override string[] GetNaStack()
{
return Array.Empty<string>();
}
public override string GetFiledName()
{
return "null";
}
}
public class AdmobUtils
{
private static IStack _stack;
private static readonly List<IStack> AvailableStrategies = new()
{
new Stack1(),
new Stack2()
// 新增策略只需在此处添加
};
public static double GetBannerEcpm(BannerView bannerView)
{
return GetEcpm(bannerView, "bannerView", "adView", "BannerStack");
}
public static double GetRewardedAdEcpm(RewardedAd rewardedAd)
{
return GetEcpm(rewardedAd, "androidRewardedAd", "rewardedAd", "RvStack");
}
public static double GetInterstitialAdEcpm(InterstitialAd interstitialAd)
{
return GetEcpm(interstitialAd, "androidInterstitialAd", "interstitialAd", "IvStack");
}
public static double GetAppOpenAdEcpm(AppOpenAd appOpenAd)
{
return GetEcpm(appOpenAd, "androidAppOpenAd", "appOpenAd", "SpStack");
}
public static double GetNativeEcpm(NativeOverlayAd ad)
{
return GetEcpm(ad, "nativeOverlayAd", "nativeAd", "NaStack");
}
private static double GetEcpm(object o, string cShapeFieldName, string javaFieldName, string stack)
{
if (_stack is EmptyStack)
{
return 0.0000001;
}
try
{
if (_stack != null)
{
return GetEcpm(GetAdValue(GetJavaAdViewOjb(o, cShapeFieldName, javaFieldName), _stack.GetStackFromName(stack)), _stack.GetFiledName());
}
}
catch (Exception e)
{
LoggerUtils.Error("[AdmobTools] e : " + e.Message + "\t cShapeFieldName : " + cShapeFieldName);
return 0.0000001;
}
foreach (var availableStrategy in AvailableStrategies)
{
try
{
var ecpm = GetEcpm(GetAdValue(GetJavaAdViewOjb(o, cShapeFieldName, javaFieldName), availableStrategy.GetStackFromName(stack)), availableStrategy.GetFiledName());
_stack = availableStrategy;
LoggerUtils.Debug("[AdmobTools] stack name : " + _stack.GetStackName());
return ecpm;
}
catch (Exception e)
{
LoggerUtils.Error("[AdmobTools] stack name " + availableStrategy.GetStackName() + "e : " + e.Message + "\t cShapeFieldName : " + cShapeFieldName);
}
}
_stack = new EmptyStack();
return 0.0000001;
}
/// <summary>
/// 获取java ad view 对象
@ -146,9 +304,9 @@ namespace WZ
/// </summary>
/// <param name="obj">admob AdValue对象</param>
/// <returns>广告收益</returns>
private static double GetEcpm(AndroidJavaObject obj)
private static double GetEcpm(AndroidJavaObject obj, string fieldName)
{
return obj.Get<long>("zzd") * 1.0 / 1000000;
return obj.Get<long>(fieldName) * 1.0 / 1000000;
}
}
}

View File

@ -27,9 +27,9 @@ namespace WZ
private void InitializeAdNetworks()
{
_adNetworks.Add(TpnAdsManager.Instance);
_adNetworks.Add(AdmobAdsManager.Instance);
_adNetworks.Add(BigoAdsManager.Instance);
_adNetworks.Add(TpnAdsManager.Instance);
_adNetworks.Add(MaxAdsManager.Instance);
_adNetworks.Add(KwaiAdsManager.Instance);
foreach (var network in _adNetworks)

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using BigoAds.Scripts.Api;
using UnityEngine;
@ -161,23 +162,11 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = 0;
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (IsAdAvailable(adUnitId) && revenue > highestRevenue)
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
return _adRevenueCache
.Where(kvp => IsAdAvailable(kvp.Key))
.OrderByDescending(kvp => kvp.Value)
.Select(kvp => kvp.Key)
.FirstOrDefault();
}
// 获取价格最高的广告收益信息
@ -189,7 +178,7 @@ namespace WZ
{
return revenue;
}
return 0;
return -1;
}
// 清理资源

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using BigoAds.Scripts.Api;
using UnityEngine;
@ -169,23 +170,11 @@ namespace WZ
// 获取价格最高的广告位ID
public string GetHighestPayingAdUnit()
{
string highestPayingAdUnit = null;
double highestRevenue = 0;
foreach (var kvp in _adRevenueCache)
{
var adUnitId = kvp.Key;
var revenue = kvp.Value;
// 确保广告确实已加载并且价格更高
if (IsAdAvailable(adUnitId) && revenue > highestRevenue)
{
highestRevenue = revenue;
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
return _adRevenueCache
.Where(kvp => IsAdAvailable(kvp.Key))
.OrderByDescending(kvp => kvp.Value)
.Select(kvp => kvp.Key)
.FirstOrDefault();
}
// 获取价格最高的广告收益信息
@ -197,7 +186,7 @@ namespace WZ
{
return revenue;
}
return 0;
return -1;
}
// 清理资源

View File

@ -10,9 +10,23 @@ namespace WZ
{
public class AdsActionEvents
{
public static void TrackAdmobValue(PlatformType adPlatform, string adSource, string adUnitName, AdsType adFormat, double value)
{
var eventName = "admob_loaded_value";
var dic = new Dictionary<string, object> {
{ "ad_platform", adPlatform.ToString()},
{ "ad_source", adSource},
{ "ad_unit_name", adUnitName},
{ "ad_format", adFormat.ToString()},
{ "value", value}
};
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dic);
ShuShuEvent.Instance.Track(eventName, dic);
LoggerUtils.Debug("[actionevent] TrackAdmobValue"+JsonMapper.ToJson(dic));
}
public static void TrackKwaiWaterfallRequest(AdsType adsType,string requestId,int waterfallRequestNumber,int parallelRequests)
{
public static void TrackKwaiWaterfallRequest(AdsType adsType, string requestId, int waterfallRequestNumber, int parallelRequests)
{
var eventName = "kwai_waterfall_request";
var dic = new Dictionary<string, object> {
{ "request_id", requestId},

View File

@ -16,6 +16,7 @@ namespace WZ
if (string.IsNullOrEmpty(json))
{
LoggerUtils.Error("KwaiBiddingConfig JSON string is null or empty");
return;
}
if (isRv)
@ -37,56 +38,32 @@ namespace WZ
public static bool GetKwaiRvFloorOpen()
{
if (_rvConfig == null)
{
return false;
}
return _rvConfig.kwai_floor_open == 1;
return _rvConfig?.kwai_floor_open == 1;
}
public static int GetRvParallelRequests()
{
if (_rvConfig == null)
{
return 0;
}
return _rvConfig.parallel_requests;
return _rvConfig?.parallel_requests ?? 0;
}
public static List<FloorConfig> GetRvFloorConfigs()
{
if (_rvConfig == null)
{
return null;
}
return _rvConfig.floors;
return _rvConfig?.floors ?? null;
}
public static bool GetKwaiIvFloorOpen()
{
if (_ivConfig == null)
{
return false;
}
return _ivConfig.kwai_floor_open == 1;
return _ivConfig?.kwai_floor_open == 1;
}
public static int GetIvParallelRequests()
{
if (_ivConfig == null)
{
return 0;
}
return _ivConfig.parallel_requests;
return _ivConfig?.parallel_requests ?? 0;
}
public static List<FloorConfig> GetIvFloorConfigs()
{
if (_ivConfig == null)
{
return null;
}
return _ivConfig.floors;
return _ivConfig?.floors ?? null;
}
public static string GetKwaiAppId()

View File

@ -38,9 +38,6 @@ namespace WZ
public void Initialize()
{
LoggerUtils.Debug("KwaiAdsManager Initialize start" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId);
if (string.IsNullOrEmpty(_appId) || string.IsNullOrEmpty(_token) || _initialized) return;
if (KwaiAdsConfigParser.GetKwaiRvFloorOpen())
{
KwaiFloorRvManager.Instance.InitializeWithFloors();
@ -50,46 +47,82 @@ namespace WZ
{
KwaiFloorIvManager.Instance.InitializeWithFloors();
}
var kwaiAdConfig = new KwaiAds.Scripts.Api.KwaiAdConfig.Builder()
.SetAppId(_appId)
.SetToken(_token)
.SetDebugLog(false)
.Build();
KwaiAds.Scripts.Api.KwaiAdsSdk.Initialize(kwaiAdConfig, new InitResultCallbackImpl());
LoggerUtils.Debug("KwaiAdsManager Initialize start" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId + " useToponKwai:" + UseToponInitKwai());
_initialized = true;
if (UseToponInitKwai())
{
if (!string.IsNullOrEmpty(_appId) && !string.IsNullOrEmpty(_token))
{
ToponKwaiUtils.InitSDK(_appId, _token, (res, msg) =>
{
LoggerUtils.Debug("KwaiAdsManager is init topon" + ToponKwaiUtils.IsInit() + " res:" + res.ToString() + " msg:" + msg);
if (res)
{
var kwaiAdConfig = new KwaiAds.Scripts.Api.KwaiAdConfig.Builder()
.SetAppId(_appId)
.SetToken(_token)
.SetDebugLog(false)
.Build();
KwaiAds.Scripts.Api.KwaiAdsSdk.Initialize(kwaiAdConfig, new InitResultCallbackImpl());
_initialized = true;
LoadInterstitial();
LoadRewarded();
}
});
}
}
else
{
LoggerUtils.Debug("KwaiAdsManager RefreshAdsData" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId + " init:" + _initialized);
if (string.IsNullOrEmpty(_appId) || string.IsNullOrEmpty(_token) || _initialized) return;
var kwaiAdConfig = new KwaiAds.Scripts.Api.KwaiAdConfig.Builder()
.SetAppId(_appId)
.SetToken(_token)
.SetDebugLog(false)
.Build();
KwaiAds.Scripts.Api.KwaiAdsSdk.Initialize(kwaiAdConfig, new InitResultCallbackImpl());
_initialized = true;
}
}
public static bool UseToponInitKwai()
{
return RushSDKManager.Instance.GetRemoteConfigStr("use_topon_kwai", "1").Equals("1");
}
public void RefreshAdsData()
{
_appId = AdConfigParser.GetKwaiAppId();
_token = AdConfigParser.GetKwaiAppToken();
_rewardAdUnitId = AdConfigParser.GetKwaiAdUnits(AdsType.Rewarded).FirstOrDefault();
_interstitialAdUnitId = AdConfigParser.GetKwaiAdUnits(AdsType.Interstitial).FirstOrDefault();
KwaiFloorRvManager.Instance.LoadKwaiBiddingConfig();
KwaiFloorIvManager.Instance.LoadKwaiBiddingConfig();
if (KwaiAdsConfigParser.GetKwaiRvFloorOpen()) KwaiFloorRvManager.Instance.LoadKwaiBiddingConfig();
if (KwaiAdsConfigParser.GetKwaiIvFloorOpen()) KwaiFloorIvManager.Instance.LoadKwaiBiddingConfig();
LoggerUtils.Debug("KwaiAdsManager RefreshAdsData" + _appId + " token:" + _token + " rewardAdUnitId:" + _rewardAdUnitId + " interstitialAdUnitId:" + _interstitialAdUnitId);
}
#region 广
public void LoadRewarded()
{
AdsActionEvents.TrackAdStartLoad(Platfrom, AdsType.Rewarded);
if (!KwaiAdsConfigParser.GetKwaiRvFloorOpen())
{
LoadRewardedStandard();
return;
}
AdsActionEvents.TrackAdStartLoad(Platfrom, AdsType.Rewarded);
KwaiFloorRvManager.Instance.LoadRewardedWithFloors();
}
public void LoadRewardedStandard()
{
LoggerUtils.Debug("kwai load rewarded standard"+_rewardAdUnitId);
if (string.IsNullOrEmpty(_rewardAdUnitId)) return;
AdsActionEvents.TrackAdStartLoad(Platfrom, AdsType.Rewarded);
if (_rewardAdController != null)
{
_rewardAdController.Destroy();
@ -151,23 +184,26 @@ namespace WZ
#region
public void LoadInterstitial()
{
AdsActionEvents.TrackAdStartLoad(Platfrom, AdsType.Interstitial);
if (!KwaiAdsConfigParser.GetKwaiIvFloorOpen())
{
LoadInterstitialStandard();
return;
}
AdsActionEvents.TrackAdStartLoad(Platfrom, AdsType.Interstitial);
KwaiFloorIvManager.Instance.LoadInterstitialWithFloors();
}
private void LoadInterstitialStandard()
{
LoggerUtils.Debug("kwai load interstitial standard:"+_interstitialAdUnitId);
if (string.IsNullOrEmpty(_interstitialAdUnitId)) return;
AdsActionEvents.TrackAdStartLoad(Platfrom, AdsType.Interstitial);
if (_interstitialAdController != null)
{
_interstitialAdController.Destroy();
_interstitialAdController = null;
}
_interstitiaAdRevenue = -1;
_interstitialAdController = KwaiAds.Scripts.Api.KwaiAdsSdk.SDK.getInterstitialAdController();

View File

@ -36,8 +36,8 @@ namespace WZ
{
_rvParallelRequests = KwaiAdsConfigParser.GetRvParallelRequests();
_rvFloorConfigs = KwaiAdsConfigParser.GetRvFloorConfigs();
KwaiAdsManager.Instance._appId = KwaiAdsConfigParser.GetKwaiAppId();
KwaiAdsManager.Instance._token = KwaiAdsConfigParser.GetKwaiAppToken();
//KwaiAdsManager.Instance._appId = KwaiAdsConfigParser.GetKwaiAppId();
//KwaiAdsManager.Instance._token = KwaiAdsConfigParser.GetKwaiAppToken();
LoggerUtils.Debug($"[kwai] floor reward bidding config loaded. FloorOpen: {KwaiAdsConfigParser.GetKwaiRvFloorOpen()}, ParallelRequests: {_rvParallelRequests}, Floors: {_rvFloorConfigs.Count}");
}

View File

@ -159,7 +159,6 @@ namespace WZ
highestPayingAdUnit = adUnitId;
}
}
return highestPayingAdUnit;
}

View File

@ -59,8 +59,14 @@ namespace WZ
switch (adType)
{
case AdsType.Banner:
if (bannerType == BannerType.Standard) return new List<string>() { StaticValue.AdmobNormalBannerId};
else return new List<string> { StaticValue.AdmobCollapsibleBannerId };
if (bannerType == BannerType.Standard)
{
return new List<string>() { StaticValue.AdmobNormalBannerId};
}
else
{
return new List<string> { StaticValue.AdmobCollapsibleBannerId };
}
case AdsType.Rewarded:
return new List<string> { StaticValue.AdmobRewardId };
case AdsType.Native:

View File

@ -40,8 +40,16 @@ namespace WZ
{
EFSdk.get().SetSDKEventCallback((eventName, dict) =>
{
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dict);
ShuShuEvent.Instance.Track(eventName, dict);
if (dict == null)
{
FireBaseAnalyticsManager.Instance.LogEvent(eventName);
ShuShuEvent.Instance.Track(eventName);
}
else
{
FireBaseAnalyticsManager.Instance.LogEvent(eventName, dict);
ShuShuEvent.Instance.Track(eventName, dict);
}
});
}

View File

@ -38,12 +38,13 @@ namespace WZ
// 获取kwai广告位信息
KwaiAdsConfigParser.Parse(GetRemoteConfigString("kwai_rv_floor"),true);
KwaiAdsConfigParser.Parse(GetRemoteConfigString("kwai_iv_floor"),false);
// 刷新广告位信息
AdsSDKManager.Instance.RefreshAdsData();
//AB测试分组参数
GroupSet();
//推送事件
EFSdk.get().SetGameActive(true);
// 刷新广告位信息
AdsSDKManager.Instance.RefreshAdsData();
// adjust卸载监控

View File

@ -21,7 +21,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
public static string GetSDKVersion()
{
return "1.0.4.0";
return "1.0.5.0";
}
protected override void Initialized()
{
@ -295,7 +295,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
callback?.Invoke(-1);
}
}
if (ivRulesShow && ivRules)
else if (ivRulesShow && ivRules)
{
//是否有缓存
bool isInterstitialReady = AdsSDKManager.Instance.IsInterstitialReady();
@ -937,6 +937,96 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
EFSdkManager.Instance.SetWebviewShowSuccessAction(action);
}
/// <summary>
/// 启用v2版本常驻通知样式
/// </summary>
/// <param name="enable">rue:启用v2版本常驻通知样式false:禁用 (禁用将使用V1版本常驻通知样式)</param>
public void EnablePersistentStyleV2(bool enable)
{
if (Application.isEditor)
{
return;
}
EFSdk.get().EnablePersistentStyleV2(enable);
}
/// <summary>
/// 设置v2版本常驻通知的文案
/// </summary>
/// <param name="text1">图标 1 文案</param>
/// <param name="text2">图标 2 文案</param>
/// <param name="text3">图标 3 文案</param>
/// <param name="text4">图标 4 文案</param>
public void SetPersistentStyleV2Text(string text1, string text2, string text3, string text4)
{
if (Application.isEditor)
{
return;
}
EFSdk.get().SetPersistentStyleV2Text(text1, text2, text3, text4);
}
/// <summary>
/// 获取指定类型的小组件是否已添加到桌面
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public bool IsWidgetAdded(EFSdk.WidgetType type)
{
if (Application.isEditor)
{
return true;
}
return EFSdk.get().IsWidgetAdded(type);
}
/// <summary>
/// 将指定类型的小组件添加到桌面
/// </summary>
/// <param name="type"></param>
/// <param name="action">添加结果</param>
/// <returns></returns>
public void RequestAddWidget(EFSdk.WidgetType type, Action<bool> action)
{
if (Application.isEditor)
{
return;
}
EFSdk.get().RequestAddWidget(type, action);
}
/// <summary>
/// 请求将Widget3X2添加到桌面,并自定义文案
/// </summary>
/// <param name="title1">标题1文案</param>
/// <param name="title2">标题2文案</param>
/// <param name="progressStr">进度条上的文案</param>
/// <param name="buttonStr">按钮的文案</param>
/// <param name="action">小组件添加结果回调</param>
public void RequestAddWidget3x2(string title1, string title2, string progressStr, string buttonStr, Action<bool> action)
{
if (Application.isEditor)
{
return;
}
EFSdk.get().RequestAddWidget3x2(title1, title2, progressStr, buttonStr, action);
}
/// <summary>
/// 请求将 Widget5X1 添加到桌面,并自定义文案
/// </summary>
/// <param name="content">内容文案</param>
/// <param name="action">小组件添加结果回调</param>
/// <param name="contentTextColor">文案文字十六进制颜色值,如: #FFFFFF</param>
public void RequestAddWidget5x1(string content, Action<bool> action, string contentTextColor = "#FFFFFF")
{
if (Application.isEditor)
{
return;
}
EFSdk.get().RequestAddWidget5x1(content, action, contentTextColor);
}
#endregion
/// <summary>
@ -1023,7 +1113,7 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
{
return "GetSSAccountId";
}
return null;
return "";
}
public string GetSSDistinctId()
@ -1052,4 +1142,6 @@ public class RushSDKManager : D_MonoSingleton<RushSDKManager>
{
Application.OpenURL(StaticValue.PrivacyUrl);
}
}

View File

@ -16,44 +16,17 @@ public class Test : MonoBehaviour
private void Start()
{
small = gameObject.transform.Find("NativeAd-small").GetComponent<RectTransform>();
medium = gameObject.transform.Find("NativeAd-medium").GetComponent<RectTransform>();
RushSDKManager.Instance.RegisterPurchaseCompletionHandler((info)=>
{
LoggerUtils.Debug("[iap] result ->" + info.ToJson());
if (info.purchaseResult == true || info.orderAlreadyExists == true)
{
RushSDKManager.Instance.LogCheckingOrder(info.productName,info.productID,info.orderID,info.gameExtra,info.gameExtra);
}
});
RushSDKManager.Instance.AddProductsStatic(new Dictionary<string, UnityEngine.Purchasing.ProductType>()
{
{ "com.tilematch.1000gold", ProductType.Consumable }
});
RushSDKManager.Instance.SetUserSourceListener((bool success, string source) =>
{
LoggerUtils.Debug("adjust callback: "+success+" adnetwork:"+source);
});
RushSDKManager.Instance.InitializeSdk(null, true);
RushSDKManager.Instance.InitializeSdk(() => { }, true);
}
public void OnShowAd()
{
// RushSDKManager.Instance.ShowBanner();
// RushSDKManager.Instance.InitializeSdk(null, true);
// KwaiAdsManager.Instance.ShowRewardAd();
// AdsSDKManager.Instance.ShowRewardAd("getcoin",(state,revenue)=>
// {
// LoggerUtils.Debug("[kwai] OnRewardedVideoAdShowed revenue:"+revenue+"+ state:"+state);
// });
// RushSDKManager.Instance.ShowBanner(BannerType.Standard,BannerAlignType.CenterTop);
RushSDKManager.Instance.PurchaseProductById("com.tilematch.1000gold","1000gold");
RushSDKManager.Instance.ShowRewardAd("test", (s, st) => { LoggerUtils.Debug("onreward show callback revenue:" + st); });
}
public void OnShowInterstitial()
{
RushSDKManager.Instance.ShowBanner(BannerType.Collapsible,BannerAlignType.CenterBottom);
RushSDKManager.Instance.ShowBanner(BannerType.Collapsible, BannerAlignType.CenterBottom);
// KwaiAdsManager.Instance.OnInterstitialCallback();
// var small = gameObject.transform.Find("NativeAd-small").GetComponent<RectTransform>();
// var medium = gameObject.transform.Find("NativeAd-medium").GetComponent<RectTransform>();
@ -89,17 +62,12 @@ public class Test : MonoBehaviour
public void OnInterShow()
{
AdsSDKManager.Instance.ShowInterstitialAd("endgame",IvType.IV1, (revenue) =>
{
LoggerUtils.Debug("oninter show call revenue:"+revenue);
});
AdsSDKManager.Instance.ShowInterstitialAd("endgame", IvType.IV1, (revenue) => { LoggerUtils.Debug("oninter show call revenue:" + revenue); });
}
public void ToponDebug()
{
// ATSDKAPI.showDebuggerUI();
RushSDKManager.Instance.HideBanner(BannerType.Standard);
}
public void MaxDebug()
@ -110,28 +78,31 @@ public class Test : MonoBehaviour
public void Native1Show()
{
var adUnitId = StaticValue.AdmobSmallNativeId;
var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
{
TemplateId = NativeTemplateId.Small
}, small);
Debug.Log($"luojian admob native ad ({adUnitId}) start show {small} medium {medium} X:{nativeAdPosition.X} Y:{nativeAdPosition.Y} Height :{nativeAdPosition.Height} Width:{nativeAdPosition.Width} Screen.dpi = {3.5}");
if (AdsSDKManager.Instance.IsNativeAdReady(adUnitId))
{
AdsSDKManager.Instance.ShowNativeAd("test", adUnitId, nativeAdPosition);
}
else
{
Debug.LogWarning($"luojian admob native ad ({adUnitId}) start show fail,not ready.");
}
RushSDKManager.Instance.HideBanner(BannerType.Collapsible);
// var adUnitId = StaticValue.AdmobSmallNativeId;
// var nativeAdPosition = NativeAdPosition.Create(new NativeTemplateStyle
// {
// TemplateId = NativeTemplateId.Small
// }, small);
// Debug.Log($"luojian admob native ad ({adUnitId}) start show {small} medium {medium} X:{nativeAdPosition.X} Y:{nativeAdPosition.Y} Height :{nativeAdPosition.Height} Width:{nativeAdPosition.Width} Screen.dpi = {3.5}");
// if (AdsSDKManager.Instance.IsNativeAdReady(adUnitId))
// {
// AdsSDKManager.Instance.ShowNativeAd("test", adUnitId, nativeAdPosition);
// }
// else
// {
// Debug.LogWarning($"luojian admob native ad ({adUnitId}) start show fail,not ready.");
// }
}
public void Native1Hide()
{
var adUnitId = StaticValue.AdmobSmallNativeId;
AdsSDKManager.Instance.RemoveNativeAd(adUnitId);
RushSDKManager.Instance.HideBanner(BannerType.Standard);
// var adUnitId = StaticValue.AdmobSmallNativeId;
// AdsSDKManager.Instance.RemoveNativeAd(adUnitId);
}
public void Native2Show()
{
var adUnitId = StaticValue.AdmobNativeId;
@ -208,4 +179,15 @@ public class Test : MonoBehaviour
var adUnitId = StaticValue.AdmobMinddleNativeId;
AdsSDKManager.Instance.RemoveNativeAd(adUnitId);
}
public void ToponKwaiIsInit()
{
var isInit = ToponKwaiUtils.IsInit();
Debug.Log($"luojian topon kwai is init : {isInit} , AdapterVersion = {ToponKwaiUtils.GetAdapterVersion()} , NetworkVersion = {ToponKwaiUtils.GetNetworkVersion()}, NetworkName = {ToponKwaiUtils.GetNetworkName()}");
}
public void ToponKwaiInitSDK()
{
ToponKwaiUtils.InitSDK("804006", "57tegTivgTRihdt", (result, message) => { Debug.Log($"luojian topon kwai init SDK result : {result} , message : {message}"); });
}
}

View File

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
namespace WZ
{
public class EditorFileUtils
{
public static List<string> GetAllFileWhereSuffix(string projectPath, string suffix)
{
return ListFiles(projectPath).Where(file => file.EndsWith(suffix)).ToList();
}
public static List<string> ListFiles(string path, List<string> fileList = null)
{
fileList ??= new List<string>();
try
{
// 获取当前目录下所有文件
var files = Directory.GetFiles(path);
fileList.AddRange(files);
// 递归获取子文件夹中的所有文件
var subdirectories = Directory.GetDirectories(path);
foreach (var subdirectory in subdirectories)
{
ListFiles(subdirectory, fileList);
}
}
catch (Exception e)
{
LoggerUtils.Error("An error occurred: " + e.Message);
}
return fileList;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 86e31887016d04347ac602e07c22a9d0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -23,7 +23,7 @@ namespace WZ
public static void Info(object message, Object context = null)
{
if (!!_enabled) return;
if (!_enabled) return;
Log($"[INFO][WZSDK] {message}", context);
}
@ -35,7 +35,7 @@ namespace WZ
public static void Error(object message, Object context = null)
{
if (!!_enabled) return;
if (!_enabled) return;
Log($"[ERROR][WZSDK] {message}", context);
}

View File

@ -0,0 +1,173 @@
using System;
using UnityEngine;
using UnityEngine.Scripting;
namespace WZ
{
public class ToponKwaiUtils
{
// 标准的topon版本
// private const string KwaiATInitManagerPath = "com.anythink.network.kwai.KwaiATInitManager";
// private const string IsInitPath = "j";
// private const string MediationInitCallbackPath = "com.anythink.core.api.MediationInitCallback";
// 定制的topon版本
private const string KwaiATInitManagerPath = "com.thinkup.network.kwai.KwaiTUInitManager";
private const string IsInitPath = "mm";
public const string MediationInitCallbackPath = "com.thinkup.core.api.MediationInitCallback";
private static AndroidJavaObject Instance = null;
private static AndroidJavaObject GetInstance()
{
Instance ??= new AndroidJavaClass(KwaiATInitManagerPath).CallStatic<AndroidJavaObject>("getInstance");
return Instance;
}
/// <summary>
/// topon 是否已经初始化了 kwai
/// </summary>
/// <returns></returns>
public static bool IsInit()
{
try
{
return GetInstance().Get<bool>(IsInitPath);
}
catch (Exception e)
{
LoggerUtils.Error($"[ToponKwaiUtils] IsInit , {e.Message}");
}
return false;
}
/// <summary>
/// 通过 topon 去初始化 kwai
/// </summary>
/// <param name="appID">kwai 的appid</param>
/// <param name="appToken">kwai 的app token</param>
/// <param name="callback">初始化的回调</param>
public static void InitSDK(string appID, string appToken, Action<bool, string> callback)
{
try
{
var hashMap = new AndroidJavaObject("java.util.HashMap");
hashMap.Call<AndroidJavaObject>("put", "app_id", appID);
hashMap.Call<AndroidJavaObject>("put", "app_token", appToken);
GetInstance().Call("initSDK", GetAndroidApplication(), hashMap, new MediationInitCallback(callback));
}
catch (Exception e)
{
LoggerUtils.Error($"[ToponKwaiUtils] InitSDK , {e.Message}");
callback.Invoke(false, e.Message);
}
}
public static string GetAdapterVersion()
{
try
{
return GetInstance().Call<string>("getAdapterVersion");
}
catch (Exception e)
{
LoggerUtils.Error($"[ToponKwaiUtils] GetAdapterVersion , {e.Message}");
}
return "";
}
public static string GetNetworkVersion()
{
try
{
return GetInstance().Call<string>("getNetworkVersion");
}
catch (Exception e)
{
LoggerUtils.Error($"[ToponKwaiUtils] GetNetworkVersion , {e.Message}");
}
return "";
}
public static string GetNetworkName()
{
try
{
return GetInstance().Call<string>("getNetworkName");
}
catch (Exception e)
{
LoggerUtils.Error($"[ToponKwaiUtils] GetNetworkName , {e.Message}");
}
return "";
}
public static string GetNetworkSDKClass()
{
try
{
return GetInstance().Call<string>("getNetworkSDKClass");
}
catch (Exception e)
{
LoggerUtils.Error($"[ToponKwaiUtils] GetNetworkSDKClass , {e.Message}");
}
return "";
}
/// <summary>
/// 获取Android的Application对象android.app.Application
/// </summary>
/// <returns>Android Application对象AndroidJavaObject若在非Android平台返回null</returns>
private static AndroidJavaObject GetAndroidApplication()
{
// 只在Android平台执行
if (Application.platform != RuntimePlatform.Android)
{
return null;
}
try
{
var unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
var currentActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
return currentActivity.Call<AndroidJavaObject>("getApplication");
}
catch (Exception e)
{
LoggerUtils.Error($"[ToponKwaiUtils] GetAndroidApplication , {e.Message}");
return null;
}
}
}
public class MediationInitCallback : AndroidJavaProxy
{
private readonly Action<bool, string> _callback;
public MediationInitCallback(Action<bool, string> callback) : base(ToponKwaiUtils.MediationInitCallbackPath)
{
_callback = callback;
}
[Preserve]
public void onSuccess()
{
_callback.Invoke(true, "success");
}
[Preserve]
public void onFail(string error)
{
_callback.Invoke(false, error);
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 24597cd26d7b463d9767c1d5d3e0ad1c
timeCreated: 1761039734

View File

@ -1,4 +1,4 @@
# Version 1.0.4.0 2025.9.19
# Version 1.0.5.0 2025.10.2
## Bugs
@ -10,6 +10,134 @@
## Changelog
- 修复topon初始化kwai广告后kwai广告加载失败问题
# Version 1.0.4.9 2025.10.20
## Bugs
- None
## Known issues
- None
## Changelog
- 修复EFSDK事件上报
# Version 1.0.4.7 2025.10.17
## Bugs
- None
## Known issues
- None
## Changelog
- 更新小组件SDK
# Version 1.0.4.6 2025.10.10
## Bugs
- None
## Known issues
- None
## Changelog
- 修复提前调用native ready接口导致的报错问题
# Version 1.0.4.5 2025.9.29
## Bugs
- None
## Known issues
- None
## Changelog
- 通过在线参数控制是否初始化kwai广告可由topon初始化
# Version 1.0.4.4 2025.9.28
## Bugs
- None
## Known issues
- None
## Changelog
- AdmobId通过配置文件读取
- 优化Kwai AppId获取方式
# Version 1.0.4.3 2025.9.25
## Bugs
- None
## Known issues
- None
## Changelog
- 修复admob广告获取不到收益问题
- 修复只有admob广告准备好的情况下且获取不到比价展示topon问题
# Version 1.0.4.2 2025.9.24
## Bugs
- None
## Known issues
- None
## Changelog
- 修复admob GetResponseInfo为空报错的问题
# Version 1.0.4.1 2025.9.22
## Bugs
- None
## Known issues
- None
## Changelog
- 修复Kwai广告位竞价逻辑收益上报unitId错误
# Version 1.0.4.0 2025.9.19
## Bugs
- None
## Known issues
- Kwai广告位竞价逻辑收益上报unitId错误
## Changelog
- 新增支付逻辑
# Version 1.0.3.0 2025.9.18

View File

@ -1 +1 @@
Build from HY-LSZNWIN10 at 2025/9/12 11:10:11
Build from HY-LSZNWIN10 at 2025/10/16 10:34:49

View File

@ -136,8 +136,8 @@ namespace AnyThink.Scripts.Editor
return;
}
var metaDataElements = elementApplication.Descendants().Where(element => element.Name.LocalName.Equals("meta-data"));
addGoogleApplicationIdIfNeeded(elementApplication, metaDataElements);
//var metaDataElements = elementApplication.Descendants().Where(element => element.Name.LocalName.Equals("meta-data"));
//addGoogleApplicationIdIfNeeded(elementApplication, metaDataElements);
// Save the updated manifest file.
manifest.Save(manifestPath);
}

View File

@ -5,14 +5,14 @@
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "2.0.3",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.36",
@ -21,7 +21,7 @@
"dependencies": {
"com.unity.ext.nunit": "1.0.6"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ide.visualstudio": {
"version": "2.0.22",
@ -30,21 +30,21 @@
"dependencies": {
"com.unity.test-framework": "1.1.9"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ide.vscode": {
"version": "1.2.5",
"depth": 0,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.nuget.newtonsoft-json": {
"version": "3.2.1",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.purchasing": {
"version": "4.12.2",
@ -52,12 +52,12 @@
"source": "registry",
"dependencies": {
"com.unity.ugui": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.services.core": "1.12.5",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.services.core": "1.12.5"
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.services.core": {
"version": "1.14.0",
@ -68,7 +68,7 @@
"com.unity.nuget.newtonsoft-json": "3.2.1",
"com.unity.modules.unitywebrequest": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.3.9",
@ -79,19 +79,19 @@
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.timeline": {
"version": "1.8.6",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.ugui": {
"version": "2.0.0",
@ -110,7 +110,7 @@
"com.unity.ugui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0"
},
"url": "https://packages.unity.cn"
"url": "https://packages.unity.com"
},
"com.unity.modules.ai": {
"version": "1.0.0",

View File

@ -14,12 +14,12 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_PixelRect:
serializedVersion: 2
x: 0
x: 2560
y: 43
width: 2560
height: 1357
m_ShowMode: 4
m_Title: Project
m_Title: Game
m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
@ -121,7 +121,7 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 100}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: 155
controlID: 152
draggingID: 0
--- !u!114 &6
MonoBehaviour:
@ -168,8 +168,8 @@ MonoBehaviour:
y: 0
width: 1155
height: 823
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 12}
m_Panes:
- {fileID: 13}
@ -273,8 +273,8 @@ MonoBehaviour:
y: 0
width: 658
height: 1307
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 17}
m_Panes:
- {fileID: 17}
@ -300,7 +300,7 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 0
x: 2560
y: 73
width: 1154
height: 802
@ -460,7 +460,7 @@ MonoBehaviour:
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 1
id: unity-search-toolbar
index: 2
index: 1
layout: 1
size: {x: 0, y: 0}
sizeOverriden: 0
@ -616,7 +616,7 @@ MonoBehaviour:
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Physics Debugger
index: 5
index: 4
layout: 4
size: {x: 0, y: 0}
sizeOverriden: 0
@ -629,7 +629,7 @@ MonoBehaviour:
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Scene Visibility
index: 7
index: 6
layout: 4
size: {x: 0, y: 0}
sizeOverriden: 0
@ -642,7 +642,7 @@ MonoBehaviour:
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/Particles
index: 8
index: 7
layout: 4
size: {x: 0, y: 0}
sizeOverriden: 0
@ -707,7 +707,7 @@ MonoBehaviour:
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
id: Scene View/TrailRenderer
index: 6
index: 5
layout: 4
size: {x: 0, y: 0}
sizeOverriden: 0
@ -964,8 +964,8 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 0
y: 842
x: 2560
y: 896
width: 1154
height: 463
m_SerializedDataModeController:
@ -998,8 +998,8 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1156
y: 19
x: 3715
y: 73
width: 324
height: 1286
m_SerializedDataModeController:
@ -1015,9 +1015,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_SelectedIDs: a07d0000
m_LastClickedID: 0
m_ExpandedIDs: 16fbfffff4ffffff
m_ExpandedIDs: c0a1ffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1061,7 +1061,7 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1481
x: 4041
y: 73
width: 419
height: 1286
@ -1085,7 +1085,8 @@ MonoBehaviour:
m_ShowAllHits: 0
m_SkipHidden: 0
m_SearchArea: 1
m_Folders: []
m_Folders:
- Assets
m_Globs: []
m_OriginalText:
m_ImportLogFlags: 0
@ -1101,7 +1102,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: da400000
m_LastClickedID: 16602
m_ExpandedIDs: 00000000be6d0000c06d0000c26d0000c46d0000c66d0000c86d0000ca6d0000cc6d0000ce6d0000d06d0000d26d0000d46d0000d66d0000d86d0000da6d0000dc6d0000de6d0000e06d0000e26d0000e46d0000e66d0000e86d0000ea6d0000ec6d0000ee6d0000f06d0000f26d0000f46d0000f66d0000f86d0000fa6d0000fc6d0000fe6d0000006e0000026e0000046e0000066e0000086e00000a6e00000c6e00000e6e0000106e0000126e0000146e0000166e0000186e0000
m_ExpandedIDs: 00000000a07d0000a27d0000a47d0000a67d0000a87d0000aa7d0000ac7d0000ae7d0000b07d0000b27d0000b47d0000b67d0000b87d0000ba7d0000bc7d0000be7d0000c07d0000c27d0000c47d0000c67d0000c87d0000ca7d0000cc7d0000ce7d0000d07d0000d27d0000d47d0000d67d0000d87d0000da7d0000dc7d0000de7d0000e07d0000e27d0000e47d0000e67d0000e87d0000ea7d0000ec7d0000ee7d0000f07d0000f27d0000f47d0000f67d0000f87d0000fa7d0000fc7d0000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1129,7 +1130,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: ffffffff00000000be6d0000c06d0000c26d0000c46d0000c66d0000c86d0000ca6d0000cc6d0000ce6d0000d06d0000d26d0000d46d0000d66d0000d86d0000da6d0000dc6d0000de6d0000e06d0000e26d0000e46d0000e66d0000e86d0000ea6d0000ec6d0000ee6d0000f06d0000f26d0000f46d0000f66d0000f86d0000fa6d0000fc6d0000fe6d0000006e0000066e0000086e00000a6e00000e6e0000106e0000126e0000146e0000166e0000
m_ExpandedIDs: ffffffff00000000a07d0000a27d0000a47d0000a67d0000a87d0000aa7d0000ac7d0000ae7d0000b07d0000b27d0000b47d0000b67d0000b87d0000ba7d0000bc7d0000be7d0000c07d0000c27d0000c47d0000c67d0000c87d0000ca7d0000cc7d0000ce7d0000d07d0000d27d0000d47d0000d67d0000d87d0000da7d0000dc7d0000de7d0000e07d0000e27d0000e47d0000e67d0000e87d0000ea7d0000ec7d0000ee7d0000f07d0000f27d0000f47d0000f67d0000f87d0000fa7d0000fc7d0000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -1156,7 +1157,7 @@ MonoBehaviour:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 1
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c6230000
m_RenameOverlay:
m_UserAcceptedRename: 0
@ -1205,7 +1206,7 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1902
x: 4462
y: 73
width: 657
height: 1286