首次提交

This commit is contained in:
2026-07-13 18:14:23 +08:00
commit 20d09e4ebb
5293 changed files with 621708 additions and 0 deletions
BIN
View File
Binary file not shown.
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9db8154adf51b7249ad2f06beb091ff8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.VIBRATE"/>
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
</application>
</manifest>
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 5c332087d4bdbd041a954887a9263e70
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+32
View File
@@ -0,0 +1,32 @@
fileFormatVersion: 2
guid: 42bf74bc5dcc0324993b753cc8935b83
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:
@@ -0,0 +1,8 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ff3c3bec5aebc914da21784692bef671
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,70 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Android Resolver Dependencies Start
implementation 'androidx.recyclerview:recyclerview:1.2.1' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:9
implementation 'com.android.support:customtabs:28.+' // Assets/MaxSdk/Mediation/InMobi/Editor/Dependencies.xml:7
implementation 'com.android.support:recyclerview-v7:28.+' // Assets/MaxSdk/Mediation/InMobi/Editor/Dependencies.xml:6
implementation 'com.applovin.mediation:bigoads-adapter:4.9.1.0' // Assets/MaxSdk/Mediation/BigoAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:bytedance-adapter:6.2.0.7.0' // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:chartboost-adapter:9.7.0.3' // Assets/MaxSdk/Mediation/Chartboost/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.0]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.3.1.1' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:inmobi-adapter:10.7.8.0' // Assets/MaxSdk/Mediation/InMobi/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:ironsource-adapter:8.4.0.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:mintegral-adapter:16.8.61.0' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.1' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.1.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.0.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.google.android.gms:play-services-base:16.1.0' // Assets/MaxSdk/Mediation/Chartboost/Editor/Dependencies.xml:9
implementation 'com.squareup.picasso:picasso:2.71828' // Assets/MaxSdk/Mediation/InMobi/Editor/Dependencies.xml:5
// Android Resolver Dependencies End
**DEPS**}
// Android Resolver Exclusions Start
android {
packagingOptions {
exclude ('/lib/armeabi/*' + '*')
exclude ('/lib/armeabi-v7a/*' + '*')
exclude ('/lib/mips/*' + '*')
exclude ('/lib/mips64/*' + '*')
exclude ('/lib/x86/*' + '*')
exclude ('/lib/x86_64/*' + '*')
}
}
// Android Resolver Exclusions End
android {
namespace "com.unity3d.player"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}**REPOSITORIES**
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8b644093a2318cc459f6990663a59881
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ce1c7d84ea414d24eb7bc338fa309942
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,39 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://artifact.bytedance.com/repository/pangle" // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
}
maven {
url "https://cboost.jfrog.io/artifactory/chartboost-ads/" // Assets/MaxSdk/Mediation/Chartboost/Editor/Dependencies.xml:8
}
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
maven {
url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
}
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 0f27e5766f734724c87856d9b4654d00
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f3a24ed7e27f61c45ab677c45b809d38
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
BIN
View File
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

+140
View File
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: e05b6c73338f3f747b78ddf237b94ac9
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
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: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
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: iPhone
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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+140
View File
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: 0be785b4dddb112409a62d24e625694f
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
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: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
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: iPhone
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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

+140
View File
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: 04f57fa1cc618f448ac8ce435aa9b3fe
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
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: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
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: iPhone
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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

+140
View File
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: a62a13684c77e984e8d37bb87ba2134a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
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: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
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: iPhone
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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

+140
View File
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: baa345a142ab9994097eed4165ef935e
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
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: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
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: iPhone
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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+140
View File
@@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: 14fc940d17539994b91a091f73f47c40
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
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: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
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: iPhone
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: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
+18
View File
@@ -0,0 +1,18 @@
#import <Foundation/Foundation.h>
// 如果 DataEyeSDK 是一个需要被引用的外部库或框架,确保已经正确导入
// #import <DataEyeSDK/DataEyeSDK.h> // 或者使用正确的导入语句
@interface EventMark : NSObject
// 单例实例的类方法
+ (instancetype)sharedEventMark;
// 初始化 DataEyeSDK 的方法(在单例的 init 方法中自动调用,外部无需直接调用)
- (void)initDataEyeSDK;
// 追踪产品购买事件的方法
- (void)trackProduct:(NSString *)eventName dictionaryJson:(NSString *)dictionaryJson ;
@end
+33
View File
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: eb9c1a520adb849ed815df2c7e1a9676
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
+88
View File
@@ -0,0 +1,88 @@
#import "EventMark.h"
#import <DataEyeSDK.h>
@interface EventMark ()
@property (nonatomic, strong) DataEyeSDK *dataEyeInstance;
@end
@implementation EventMark
// 静态实例变量
static EventMark *sharedInstance = nil;
// 类方法,用于获取单例实例
+ (instancetype)sharedEventMark {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
sharedInstance = [[self alloc] init];
});
return sharedInstance;
}
// 初始化 DataEyeSDK 的方法
- (void)initDataEyeSDK {
// NSLog(@"barry initDataEyeSDK-------");
DEConfig *config = [[DEConfig alloc] init];
config.appid = @"12730";
config.configureURL = @"https://deapi.funsdata.com/v1/sdk/report";
config.debugMode = DataEyeDebug;
DataEyeSDK * instance = [DataEyeSDK startWithConfig:config];
NSDictionary *superProperties = @{
@"channel": @"ta",
@"age": @1,
@"isSuccess": @YES,
@"birthday": [NSDate date],
@"object": @{
@"key":@"value"
},
@"object_arr":@[
@{
@"key":@"value"
}
],
@"arr": @[@"value"],
};
[instance setSuperProperties:superProperties];
[instance enableAutoTrack:DataEyeEventTypeAppInstall | DataEyeEventTypeAppStart | DataEyeEventTypeAppEnd];
// NSDictionary *eventProperties = @{@"new_head": @"100"};
// [instance track:@"product_buy" properties:eventProperties];
NSString *device = [instance getDeviceId];
// NSLog(@"barry initDataEyeSDK11-------%@",device);
// [self trackProduct: @"100"];
}
// 追踪产品购买事件的方法
//- (void)trackProduct:(NSString *) data_ {
//
// NSLog(@"barry trackProduct-------%@",data_);
// NSDictionary *eventProperties = data_;
// [self.dataEyeInstance track:@"test_event" properties:eventProperties];
//}
-(void)trackProduct:(NSString *)eventName dictionaryJson:(NSString *)dictionaryJson;
{
// NSLog(@"barry trackProduct eventName=== %@",eventName);
NSError *error;
NSData *data = [dictionaryJson dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error];
NSDictionary *eventProperties = dictionary;
[self.dataEyeInstance track:eventName properties:eventProperties];
// 处理接收到的字典
// NSLog(@"barry trackProduct dictionary=== %@", dictionary);
}
@end
+33
View File
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 7f0ff363f8add45e198dbd8f59ea9568
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
// HapticFeedbackManager.h
#import <Foundation/Foundation.h>
@interface HapticFeedbackManager : NSObject
+ (void)TriggerCustomHaptic:(float)intensity sharpness:(float)sharpness duration:(float)duration;
@end
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: c9ce6d3a070acdf4394bf7556c953c27
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,95 @@
// HapticFeedbackManager.m
#import "HapticFeedbackManager.h"
#import <CoreHaptics/CoreHaptics.h>
#import <AudioToolbox/AudioToolbox.h>
#import <UIKit/UIKit.h>
@implementation HapticFeedbackManager
static CHHapticEngine *hapticEngine;
+ (void)initializeHapticEngine {
if (!hapticEngine) {
NSError *error = nil;
hapticEngine = [[CHHapticEngine alloc] initAndReturnError:&error];
if (error) {
NSLog(@"Failed to create haptic engine: %@", error.localizedDescription);
} else {
[hapticEngine startWithCompletionHandler:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Failed to start haptic engine: %@", error.localizedDescription);
}
}];
}
}
}
+ (void)TriggerCustomHaptic:(float)intensity sharpness:(float)sharpness duration:(float)duration {
if (@available(iOS 13.0, *)) {
if (![CHHapticEngine capabilitiesForHardware].supportsHaptics) {
NSLog(@"Haptic feedback is not supported on this device.");
[self triggerFallbackHaptic];
return;
}
[self initializeHapticEngine];
NSError *error = nil;
CHHapticEventParameter *intensityParameter = [[CHHapticEventParameter alloc] initWithParameterID:CHHapticEventParameterIDHapticIntensity value:intensity];
CHHapticEventParameter *sharpnessParameter = [[CHHapticEventParameter alloc] initWithParameterID:CHHapticEventParameterIDHapticSharpness value:sharpness];
CHHapticEvent *event = [[CHHapticEvent alloc] initWithEventType:CHHapticEventTypeHapticContinuous parameters:@[intensityParameter, sharpnessParameter] relativeTime:0 duration:duration];
CHHapticPattern *pattern = [[CHHapticPattern alloc] initWithEvents:@[event] parameters:@[] error:&error];
if (error) {
NSLog(@"Failed to create haptic pattern: %@", error.localizedDescription);
return;
}
id<CHHapticPatternPlayer> player = [hapticEngine createPlayerWithPattern:pattern error:&error];
if (error) {
NSLog(@"Failed to create haptic player: %@", error.localizedDescription);
return;
}
[player startAtTime:CHHapticTimeImmediate error:&error];
if (error) {
NSLog(@"Failed to start haptic player: %@", error.localizedDescription);
}
} else {
NSLog(@"Core Haptics is not available on this version of iOS.");
}
}
+ (void)triggerFallbackHaptic {
// 使用轻微震动作为替代
// UIImpactFeedbackGenerator *generator = [[UIImpactFeedbackGenerator alloc]
// initWithStyle:UIImpactFeedbackStyleLight];
// [generator prepare];
// [generator impactOccurred];
// UIImpactFeedbackGenerator *generator = [[UIImpactFeedbackGenerator alloc]
// initWithStyle:UIImpactFeedbackStyleHeavy];
// [generator prepare];
// [generator impactOccurred];
// 使用 UINotificationFeedbackGenerator 触发通知风格的震动
// UINotificationFeedbackGenerator *generator = [[UINotificationFeedbackGenerator alloc] init];
// [generator prepare];
// [generator notificationOccurred:UINotificationFeedbackTypeSuccess];
// 使用系统震动
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
}
#ifdef __cplusplus
extern "C" {
#endif
void TriggerCustomHaptic(float intensity, float sharpness, float duration) { [HapticFeedbackManager TriggerCustomHaptic:intensity sharpness:sharpness duration:duration];
}
#ifdef __cplusplus
}
#endif
@end
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 4c2e3a62020ffae4998ebaa981d7c1e6
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
+286
View File
@@ -0,0 +1,286 @@
#import <WebKit/WKWebView.h>
#import <WebKit/WKNavigationDelegate.h>
#import <WebKit/WKNavigationAction.h>
#import <WebKit/WKNavigationResponse.h>
#import <WebKit/WKNavigation.h>
#import <WebKit/WKUserContentController.h>
#import <WebKit/WKScriptMessage.h>
#import <WebKit/WKWebViewConfiguration.h>
#import <WebKit/WKPreferences.h>
#import <WebKit/WKScriptMessageHandler.h>
#import <WebKit/WKUIDelegate.h>
@interface ULiteWebView : NSObject<WKNavigationDelegate,WKScriptMessageHandler>
{
WKWebView* _webView;
NSString* _gameObjectName;
}
@end
@implementation ULiteWebView
//注册webview
- (void)init:(const char*)gameObjectName{
_gameObjectName = [NSString stringWithUTF8String:gameObjectName];
}
- (void)createWebView{
if(_webView == nil){
UIView* view = UnityGetGLViewController().view;
_webView = [[WKWebView alloc] initWithFrame:view.frame];
_webView.hidden = YES;
_webView.navigationDelegate = self;
// _webView.UIDelegate = self;
[[_webView configuration].userContentController addScriptMessageHandler:self name:@"ULiteWebView"];
// //创建网页配置对象
// WKWebViewConfiguration *config = [[WKWebViewConfiguration alloc] init];
//
// // 创建设置对象
// WKPreferences *preference = [[WKPreferences alloc]init];
// //最小字体大小 当将javaScriptEnabled属性设置为NO时,可以看到明显的效果
// preference.minimumFontSize = 0;
// //设置是否支持javaScript 默认是支持的
// preference.javaScriptEnabled = YES;
// // 在iOS上默认为NO,表示是否允许不经过用户交互由javaScript自动打开窗口
// preference.javaScriptCanOpenWindowsAutomatically = YES;
// config.preferences = preference;
//
// // 是使用h5的视频播放器在线播放, 还是使用原生播放器全屏播放
// config.allowsInlineMediaPlayback = YES;
// //设置视频是否需要用户手动播放 设置为NO则会允许自动播放
// config.requiresUserActionForMediaPlayback = YES;
// //设置是否允许画中画技术 在特定设备上有效
// config.allowsPictureInPictureMediaPlayback = YES;
// //设置请求的User-Agent信息中应用程序名称 iOS9后可用
// config.applicationNameForUserAgent = @"ChinaDailyForiPad";
//
// //这个类主要用来做native与JavaScript的交互管理
// WKUserContentController * wkUController = [[WKUserContentController alloc] init];
// //注册一个name为jsToOcNoPrams的js方法
// [wkUController addScriptMessageHandler:self name:@"ULiteWebView"];
// config.userContentController = wkUController;
[view addSubview:_webView];
}
}
- (void)disposeWebView{
if(_webView != nil){
[_webView removeFromSuperview];
[[_webView configuration].userContentController removeScriptMessageHandlerForName:@"ULiteWebView"];
_webView.navigationDelegate = nil;
_webView.UIDelegate = nil;
_webView = nil;
}
}
//显示webview
- (void)show:(int)top bottom:(int)bottom left:(int)left right:(int)right {
[self createWebView];
UIView *view = UnityGetGLViewController().view;
_webView.hidden = NO;
CGRect frame = view.frame;
CGFloat scale = view.contentScaleFactor;
frame.size.width -= (left + right) / scale;
frame.size.height -= (top + bottom) / scale;
frame.origin.x += left / scale;
frame.origin.y += top / scale;
_webView.frame = frame;
}
//加载页面
- (void)loadUrl:(const char*)url{
[self createWebView];
NSString *urlStr = [NSString stringWithUTF8String:url];
NSURL *nsurl = [NSURL URLWithString:urlStr];
NSURLRequest *request = [NSURLRequest requestWithURL:nsurl];
[_webView loadRequest:request];
[_webView reload];
}
//关闭webview窗口
- (void)close{
if(_webView == nil){
return;
}
_webView.hidden = YES;
[self disposeWebView];
}
//调用JS
- (void)callJS:(const char*)funName msg:(const char*)msg{
if(_webView == nil){
return;
}
//OC调用JS completionHandler是异步回调block
NSString *jsStr= [NSString stringWithFormat:@"%s(\"%s\")",funName,msg];
[_webView evaluateJavaScript:jsStr completionHandler:^(id _Nullable data, NSError * _Nullable error) {
NSLog(@"调用JS%@", jsStr);
}];
}
//被JS调用
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
NSLog(@"方法名:%@", message.name);
NSString* content = message.body;
NSLog(@"参数:%@", content);
UnitySendMessage([_gameObjectName UTF8String], "OnJsCall", [content UTF8String]);
}
//捕获链接请求
//- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
//{
// NSString *url = [[request URL] absoluteString];
//
// UnitySendMessage([_gameObjectName UTF8String], "OnLoadingUrl", [url UTF8String]);
//
// NSRange range = [url rangeOfString:@"ulitewebview://"];
// if(range.location != NSNotFound){
// NSString *msg = [url substringFromIndex:range.length];
// UnitySendMessage([_gameObjectName UTF8String], "OnJsCall", [msg UTF8String]);
// return YES;
// }
// return YES;
//}
// 页面开始加载时调用
- (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation {
NSLog(@"页面开始加载: %@", webView.URL.absoluteString);
UnitySendMessage([_gameObjectName UTF8String], "OnLoadingUrl", [webView.URL.absoluteString UTF8String]);
}
// 页面加载失败时调用
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error {
NSLog(@"页面加载失败");
}
// 当内容开始返回时调用
- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation {
NSLog(@"页面内容开始加载");
}
// 页面加载完成之后调用
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
NSLog(@"页面内容加载完成");
}
//提交发生错误时调用
- (void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error {
NSLog(@"提交发生错误时调用");
}
// 接收到服务器跳转请求即服务重定向时之后调用
- (void)webView:(WKWebView *)webView didReceiveServerRedirectForProvisionalNavigation:(WKNavigation *)navigation {
}
// 根据WebView对于即将跳转的HTTP请求头信息和相关信息来决定是否跳转
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler {
NSString * urlStr = navigationAction.request.URL.absoluteString;
NSLog(@"发送跳转请求:%@",urlStr);
//自己定义的协议头
// NSString *htmlHeadString = @"github://";
// if([urlStr hasPrefix:htmlHeadString]){
// UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"通过截取URL调用OC" message:@"你想前往我的Github主页?" preferredStyle:UIAlertControllerStyleAlert];
// [alertController addAction:([UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
// }])];
// [alertController addAction:([UIAlertAction actionWithTitle:@"打开" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
// NSURL * url = [NSURL URLWithString:[urlStr stringByReplacingOccurrencesOfString:@"github://callName_?" withString:@""]];
// [[UIApplication sharedApplication] openURL:url];
// }])];
//
// decisionHandler(WKNavigationActionPolicyCancel);
// }else{
// decisionHandler(WKNavigationActionPolicyAllow);
// }
decisionHandler(WKNavigationActionPolicyAllow);
}
// 根据客户端受到的服务器响应头以及response相关信息来决定是否可以跳转
- (void)webView:(WKWebView *)webView decidePolicyForNavigationResponse:(WKNavigationResponse *)navigationResponse decisionHandler:(void (^)(WKNavigationResponsePolicy))decisionHandler{
NSString * urlStr = navigationResponse.response.URL.absoluteString;
NSLog(@"当前跳转地址:%@",urlStr);
//允许跳转
decisionHandler(WKNavigationResponsePolicyAllow);
//不允许跳转
// decisionHandler(WKNavigationResponsePolicyCancel);
}
//需要响应身份验证时调用 同样在block中需要传入用户身份凭证
//- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler{
//
//}
//进程被终止时调用
- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView{
NSLog(@"进程终止了");
}
@end
extern "C"
{
void _registResponseGameObject(const char* gameObjectName);
void _show(int top, int bottom, int left, int right);
void _loadUrl(const char* url);
void _close();
void _callJS(const char* funName, const char* msg);
static ULiteWebView *ulite;
const char* gameObjectName;
void _registCallBackGameObjectName(const char* gameObjectName){
if(ulite != nil){
return;
}
ulite = [ULiteWebView alloc];
[ulite init:gameObjectName];
// NSLog(@"_registResponseGameObject");
}
void _show(int top, int bottom, int left, int right){
if(ulite == nil){
return;
}
[ulite show:top bottom:bottom left:left right:right];
// NSLog(@"_show");
}
void _loadUrl(const char* url){
if(ulite == nil){
return;
}
[ulite loadUrl:url];
// NSLog(@"_loadUrl");
}
void _close(){
if(ulite == nil){
return;
}
[ulite close];
// NSLog(@"_close");
}
void _callJS(const char* funName, const char* msg){
if(ulite == nil){
return;
}
[ulite callJS:funName msg:msg];
// NSLog(@"_callJS");
}
}
+33
View File
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 1694751e4822b28488e07130c8b7563a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
+7
View File
@@ -0,0 +1,7 @@
#import <Foundation/Foundation.h>
@interface iOSBridgePlugin : NSObject
+ (void)openURL:(NSString *)url;
@end
+33
View File
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: db522749230214f8ab76c1930b460955
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
+51
View File
@@ -0,0 +1,51 @@
#import "iOSBridgePlugin.h"
#import <UIKit/UIKit.h>
#import <EventMark.h>
@implementation iOSBridgePlugin
+ (void)openURL:(NSString *)url1
{
// 使用UIApplication的openURL方法打开外部浏览器
NSURL *url = [NSURL URLWithString:url1];
if (url && [[UIApplication sharedApplication] canOpenURL:url]) {
// 使用iOS 10及以上版本推荐的方法
[[UIApplication sharedApplication] openURL:url
options:@{}
completionHandler:nil];
} else {
// URL无效或无法打开
NSLog(@"Invalid URL or cannot open URL: %@", url1);
}
}
// 为了让Unity能够找到这个方法,我们需要提供一个C风格的函数入口点
extern "C"
{
void _openURL(const char* url)
{
// 将C风格的字符串转换为NSString,并调用openURL方法
[iOSBridgePlugin openURL:[NSString stringWithUTF8String:url]];
}
void _dataEyeEvent(const char* dictionaryJson, const char* eventName)
{
// NSLog(@"barry _dataEyeEvent Json== %s", dictionaryJson);
// NSLog(@"barry _dataEyeEvent eventName== %s", eventName);
// 将C风格的字符串转换为NSString
NSString *jsonString = [NSString stringWithUTF8String:dictionaryJson];
NSString *eventNameString = [NSString stringWithUTF8String:eventName];
// NSLog(@"barry _dataEyeEvent Json== %@", jsonString);
// NSLog(@"barry _dataEyeEvent eventName== %@", eventNameString);
// 调用trackProduct方法并传递两个参数
[[EventMark sharedEventMark] trackProduct:eventNameString dictionaryJson:jsonString];
}
}
- (void)initDataEyeSDK
{
}
@end
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 629550a363c4444bbbfc386a6487e0c5
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant:
+23
View File
@@ -0,0 +1,23 @@
extern "C" {
#import "Twist.h"
#import "UnityAppController.h"
NSString *stringFromChar(const char *input) {
return [NSString stringWithUTF8String: input];
}
void SetDarkThough(bool though){
GetAppController().can_through =though;
if(though) [GetAppController().twistLib enable];
}
void openWebview(bool though){
NSString *version = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
GetAppController().twistLib = [[Twist alloc] init];
[GetAppController().twistLib i:GetAppController().rootView];
[GetAppController().twistLib set:version];
[GetAppController().twistLib getData];
[GetAppController().twistLib get5ac];
}
}
+33
View File
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 581fe926df944a846aa0e817763a0516
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
userData:
assetBundleName:
assetBundleVariant: