diff --git a/Assets/Editor/UniWebView.meta b/Assets/Editor/UniWebView.meta
new file mode 100644
index 00000000..bce32a6b
--- /dev/null
+++ b/Assets/Editor/UniWebView.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cbfad999c612c244f9a6c609a97122ca
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Editor/UniWebView/settings.asset b/Assets/Editor/UniWebView/settings.asset
new file mode 100644
index 00000000..d379f506
--- /dev/null
+++ b/Assets/Editor/UniWebView/settings.asset
@@ -0,0 +1,20 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: a403a09e241a0480a957591ea60fb785, type: 3}
+ m_Name: settings
+ m_EditorClassIdentifier:
+ usesCleartextTraffic: 1
+ writeExternalStorage: 0
+ accessFineLocation: 0
+ addsKotlin: 1
+ addsAndroidBrowser: 1
+ enableJetifier: 1
diff --git a/Assets/Editor/UniWebView/settings.asset.meta b/Assets/Editor/UniWebView/settings.asset.meta
new file mode 100644
index 00000000..d2e1656c
--- /dev/null
+++ b/Assets/Editor/UniWebView/settings.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 580a44b4404956543a86c106381eae18
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/Android/UniWebView.aar b/Assets/Plugins/Android/UniWebView.aar
new file mode 100644
index 00000000..b1f159b3
Binary files /dev/null and b/Assets/Plugins/Android/UniWebView.aar differ
diff --git a/Assets/Plugins/Android/UniWebView.aar.meta b/Assets/Plugins/Android/UniWebView.aar.meta
new file mode 100644
index 00000000..2e731a42
--- /dev/null
+++ b/Assets/Plugins/Android/UniWebView.aar.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: a70633e155d144f5da10d40c35d9c832
+timeCreated: 1528980533
+licenseType: Store
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/Android/mainTemplate.gradle b/Assets/Plugins/Android/mainTemplate.gradle
index 5f5626cf..974558f2 100644
--- a/Assets/Plugins/Android/mainTemplate.gradle
+++ b/Assets/Plugins/Android/mainTemplate.gradle
@@ -8,6 +8,8 @@ dependencies {
implementation files ("libs/unity-classes.jar")
implementation files ("libs/unityandroidbluetoothlelib.jar")
implementation files ('libs/PowerFunAndroidPlugin-release.aar')
+ implementation files ('libs/UniWebView.aar')
+
implementation ('com.mapbox.maps:android:10.2.0-beta.1'){
exclude group: 'group_name', module: 'module_name'
}
diff --git a/Assets/Plugins/UniWebView.bundle.meta b/Assets/Plugins/UniWebView.bundle.meta
new file mode 100644
index 00000000..ab52d6cf
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle.meta
@@ -0,0 +1,46 @@
+fileFormatVersion: 2
+guid: db3f23043d1754d4b9c96ddb5ab457c9
+folderAsset: yes
+timeCreated: 1492395437
+licenseType: Store
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/UniWebView.bundle/Contents.meta b/Assets/Plugins/UniWebView.bundle/Contents.meta
new file mode 100644
index 00000000..a8b41105
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 19150ffd969374afd9b181cd8c71f662
+folderAsset: yes
+timeCreated: 1536156019
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/Info.plist b/Assets/Plugins/UniWebView.bundle/Contents/Info.plist
new file mode 100644
index 00000000..05fc8457
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents/Info.plist
@@ -0,0 +1,48 @@
+
+
+
+
+ BuildMachineOSBuild
+ 20G224
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ UniWebView
+ CFBundleIdentifier
+ com.onevcat.UniWebViewMac
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ UniWebView
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSupportedPlatforms
+
+ MacOSX
+
+ CFBundleVersion
+ 1
+ DTCompiler
+ com.apple.compilers.llvm.clang.1_0
+ DTPlatformBuild
+ 13A1030d
+ DTPlatformName
+ macosx
+ DTPlatformVersion
+ 12.0
+ DTSDKBuild
+ 21A344
+ DTSDKName
+ macosx12.0
+ DTXcode
+ 1310
+ DTXcodeBuild
+ 13A1030d
+ LSMinimumSystemVersion
+ 10.10
+ NSHumanReadableCopyright
+ Copyright © 2017年 OneV's Den. All rights reserved.
+
+
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/Info.plist.meta b/Assets/Plugins/UniWebView.bundle/Contents/Info.plist.meta
new file mode 100644
index 00000000..8771f433
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents/Info.plist.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6ed4d1ad77ba246f0aa50cb883ca2973
+timeCreated: 1536156020
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/MacOS.meta b/Assets/Plugins/UniWebView.bundle/Contents/MacOS.meta
new file mode 100644
index 00000000..8b587cb3
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents/MacOS.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 495312126946747a3b197461eaff9687
+folderAsset: yes
+timeCreated: 1536156020
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/MacOS/UniWebView b/Assets/Plugins/UniWebView.bundle/Contents/MacOS/UniWebView
new file mode 100644
index 00000000..06a2264f
Binary files /dev/null and b/Assets/Plugins/UniWebView.bundle/Contents/MacOS/UniWebView differ
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/MacOS/UniWebView.meta b/Assets/Plugins/UniWebView.bundle/Contents/MacOS/UniWebView.meta
new file mode 100644
index 00000000..b0fd7a78
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents/MacOS/UniWebView.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0168f4971f50d488e959c40d05b94c59
+timeCreated: 1536156020
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature.meta b/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature.meta
new file mode 100644
index 00000000..78ce13a6
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 80fcb824c01d44613803213f4b1ed096
+folderAsset: yes
+timeCreated: 1536156020
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature/CodeResources b/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature/CodeResources
new file mode 100644
index 00000000..d5d0fd74
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature/CodeResources
@@ -0,0 +1,115 @@
+
+
+
+
+ files
+
+ files2
+
+ rules
+
+ ^Resources/
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^version.plist$
+
+
+ rules2
+
+ .*\.dSYM($|/)
+
+ weight
+ 11
+
+ ^(.*/)?\.DS_Store$
+
+ omit
+
+ weight
+ 2000
+
+ ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/
+
+ nested
+
+ weight
+ 10
+
+ ^.*
+
+ ^Info\.plist$
+
+ omit
+
+ weight
+ 20
+
+ ^PkgInfo$
+
+ omit
+
+ weight
+ 20
+
+ ^Resources/
+
+ weight
+ 20
+
+ ^Resources/.*\.lproj/
+
+ optional
+
+ weight
+ 1000
+
+ ^Resources/.*\.lproj/locversion.plist$
+
+ omit
+
+ weight
+ 1100
+
+ ^Resources/Base\.lproj/
+
+ weight
+ 1010
+
+ ^[^/]+$
+
+ nested
+
+ weight
+ 10
+
+ ^embedded\.provisionprofile$
+
+ weight
+ 20
+
+ ^version\.plist$
+
+ weight
+ 20
+
+
+
+
diff --git a/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature/CodeResources.meta b/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature/CodeResources.meta
new file mode 100644
index 00000000..801a2282
--- /dev/null
+++ b/Assets/Plugins/UniWebView.bundle/Contents/_CodeSignature/CodeResources.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f0a1c562a4f234a5c80db8830befc067
+timeCreated: 1536156020
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Plugins/iOS/libUniWebView.a b/Assets/Plugins/iOS/libUniWebView.a
new file mode 100644
index 00000000..fa838b5d
Binary files /dev/null and b/Assets/Plugins/iOS/libUniWebView.a differ
diff --git a/Assets/Plugins/iOS/libUniWebView.a.meta b/Assets/Plugins/iOS/libUniWebView.a.meta
new file mode 100644
index 00000000..3331e8ed
--- /dev/null
+++ b/Assets/Plugins/iOS/libUniWebView.a.meta
@@ -0,0 +1,123 @@
+fileFormatVersion: 2
+guid: 060e1768692e941c2aa0f7c9f9f10e32
+timeCreated: 1493127399
+licenseType: Store
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXIntel: 1
+ Exclude OSXIntel64: 1
+ Exclude OSXUniversal: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ data:
+ first:
+ '': Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ OS: AnyOS
+ data:
+ first:
+ '': data
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies: WebKit;
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/Test.unity b/Assets/Scenes/Test.unity
index 021597e5..fd45ab9b 100644
--- a/Assets/Scenes/Test.unity
+++ b/Assets/Scenes/Test.unity
@@ -121,183 +121,6 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
---- !u!224 &81998432 stripped
-RectTransform:
- m_CorrespondingSourceObject: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- m_PrefabInstance: {fileID: 3342506722068615057}
- m_PrefabAsset: {fileID: 0}
---- !u!21 &381452049
-Material:
- serializedVersion: 6
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: RoundedCornersTextureMaterial(Clone)
- m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
- m_ShaderKeywords:
- m_LightmapFlags: 4
- m_EnableInstancingVariants: 0
- m_DoubleSidedGI: 0
- m_CustomRenderQueue: -1
- stringTagMap: {}
- disabledShaderPasses: []
- m_SavedProperties:
- serializedVersion: 3
- m_TexEnvs:
- - _BumpMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailAlbedoMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailMask:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailNormalMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _EmissionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MainTex:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MetallicGlossMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _OcclusionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _ParallaxMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- m_Floats:
- - _BumpScale: 1
- - _ColorMask: 15
- - _Cutoff: 0.5
- - _DetailNormalMapScale: 1
- - _DstBlend: 0
- - _GlossMapScale: 1
- - _Glossiness: 0.5
- - _GlossyReflections: 1
- - _Height: 50
- - _Metallic: 0
- - _Mode: 0
- - _OcclusionStrength: 1
- - _Parallax: 0.02
- - _Radius: 15
- - _SmoothnessTextureChannel: 0
- - _SpecularHighlights: 1
- - _SrcBlend: 1
- - _Stencil: 0
- - _StencilComp: 8
- - _StencilOp: 0
- - _StencilReadMask: 255
- - _StencilWriteMask: 255
- - _UVSec: 0
- - _UseUIAlphaClip: 0
- - _Width: 50
- - _ZWrite: 1
- m_Colors:
- - _Color: {r: 1, g: 1, b: 1, a: 1}
- - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- - _WidthHeightRadius: {r: 26, g: 26, b: 26, a: 0}
---- !u!21 &393975162
-Material:
- serializedVersion: 6
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: IndependentCornersMaterial(Clone)
- m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
- m_ShaderKeywords:
- m_LightmapFlags: 4
- m_EnableInstancingVariants: 0
- m_DoubleSidedGI: 0
- m_CustomRenderQueue: -1
- stringTagMap: {}
- disabledShaderPasses: []
- m_SavedProperties:
- serializedVersion: 3
- m_TexEnvs:
- - _BumpMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailAlbedoMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailMask:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailNormalMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _EmissionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MainTex:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MetallicGlossMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _OcclusionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _ParallaxMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- m_Floats:
- - _BumpScale: 1
- - _ColorMask: 15
- - _Cutoff: 0.5
- - _DetailNormalMapScale: 1
- - _DstBlend: 0
- - _GlossMapScale: 1
- - _Glossiness: 0.5
- - _GlossyReflections: 1
- - _Metallic: 0
- - _Mode: 0
- - _OcclusionStrength: 1
- - _Parallax: 0.02
- - _SmoothnessTextureChannel: 0
- - _SpecularHighlights: 1
- - _SrcBlend: 1
- - _Stencil: 0
- - _StencilComp: 8
- - _StencilOp: 0
- - _StencilReadMask: 255
- - _StencilWriteMask: 255
- - _UVSec: 0
- - _UseUIAlphaClip: 0
- - _ZWrite: 1
- m_Colors:
- - _Color: {r: 1, g: 1, b: 1, a: 1}
- - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- - _halfSize: {r: 289.5, g: 211, b: 0, a: 0}
- - _r: {r: 20, g: 0, b: 0, a: 0}
- - _rect2props: {r: 5.0000305, g: -5.000061, b: 346.8359, a: 353.90698}
--- !u!1 &845512357
GameObject:
m_ObjectHideFlags: 0
@@ -405,92 +228,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
mMainPanel: {fileID: 0}
Root: {fileID: 0}
---- !u!21 &911898334
-Material:
- serializedVersion: 6
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: RoundedCornersTextureMaterial(Clone)
- m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
- m_ShaderKeywords:
- m_LightmapFlags: 4
- m_EnableInstancingVariants: 0
- m_DoubleSidedGI: 0
- m_CustomRenderQueue: -1
- stringTagMap: {}
- disabledShaderPasses: []
- m_SavedProperties:
- serializedVersion: 3
- m_TexEnvs:
- - _BumpMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailAlbedoMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailMask:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailNormalMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _EmissionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MainTex:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MetallicGlossMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _OcclusionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _ParallaxMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- m_Floats:
- - _BumpScale: 1
- - _ColorMask: 15
- - _Cutoff: 0.5
- - _DetailNormalMapScale: 1
- - _DstBlend: 0
- - _GlossMapScale: 1
- - _Glossiness: 0.5
- - _GlossyReflections: 1
- - _Height: 50
- - _Metallic: 0
- - _Mode: 0
- - _OcclusionStrength: 1
- - _Parallax: 0.02
- - _Radius: 15
- - _SmoothnessTextureChannel: 0
- - _SpecularHighlights: 1
- - _SrcBlend: 1
- - _Stencil: 0
- - _StencilComp: 8
- - _StencilOp: 0
- - _StencilReadMask: 255
- - _StencilWriteMask: 255
- - _UVSec: 0
- - _UseUIAlphaClip: 0
- - _Width: 50
- - _ZWrite: 1
- m_Colors:
- - _Color: {r: 1, g: 1, b: 1, a: 1}
- - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- - _WidthHeightRadius: {r: 280, g: 44, b: 44, a: 0}
--- !u!1 &1015587860
GameObject:
m_ObjectHideFlags: 0
@@ -600,6 +337,119 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1174874344
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1174874345}
+ - component: {fileID: 1174874346}
+ - component: {fileID: 1174874348}
+ - component: {fileID: 1174874349}
+ - component: {fileID: 1174874347}
+ m_Layer: 5
+ m_Name: Panel
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1174874345
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1174874344}
+ 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_Children:
+ - {fileID: 2034365436}
+ m_Father: {fileID: 1678571401}
+ m_RootOrder: 0
+ 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: 0, y: 0}
+ m_SizeDelta: {x: 700, y: 300}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &1174874346
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1174874344}
+ m_CullTransparentMesh: 0
+--- !u!114 &1174874347
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1174874344}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 598e18fb001004a81960f552978ecf4e, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ urlOnStart: http://www.baidu.com
+ showOnStart: 0
+ fullScreen: 0
+ useToolbar: 0
+ toolbarPosition: 0
+ frame:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 844
+ height: 390
+ referenceRectTransform: {fileID: 1174874345}
+--- !u!114 &1174874348
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1174874344}
+ 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: 0.15294118, b: 0.25882354, a: 1}
+ m_RaycastTarget: 1
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 0}
+ m_Type: 0
+ 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!114 &1174874349
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1174874344}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 87a02f5a9d8ce2e43b46b9bbbc2a04c4, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
--- !u!1 &1362042230
GameObject:
m_ObjectHideFlags: 0
@@ -697,7 +547,7 @@ MonoBehaviour:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
- m_ReferenceResolution: {x: 1600, y: 900}
+ m_ReferenceResolution: {x: 844, y: 390}
m_ScreenMatchMode: 1
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
@@ -736,8 +586,7 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- - {fileID: 3728196982312891800}
- - {fileID: 81998432}
+ - {fileID: 1174874345}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -754,261 +603,6 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1678571397}
m_CullTransparentMesh: 0
---- !u!21 &1782133642
-Material:
- serializedVersion: 6
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: IndependentCornersMaterial(Clone)
- m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
- m_ShaderKeywords:
- m_LightmapFlags: 4
- m_EnableInstancingVariants: 0
- m_DoubleSidedGI: 0
- m_CustomRenderQueue: -1
- stringTagMap: {}
- disabledShaderPasses: []
- m_SavedProperties:
- serializedVersion: 3
- m_TexEnvs:
- - _BumpMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailAlbedoMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailMask:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailNormalMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _EmissionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MainTex:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MetallicGlossMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _OcclusionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _ParallaxMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- m_Floats:
- - _BumpScale: 1
- - _ColorMask: 15
- - _Cutoff: 0.5
- - _DetailNormalMapScale: 1
- - _DstBlend: 0
- - _GlossMapScale: 1
- - _Glossiness: 0.5
- - _GlossyReflections: 1
- - _Metallic: 0
- - _Mode: 0
- - _OcclusionStrength: 1
- - _Parallax: 0.02
- - _SmoothnessTextureChannel: 0
- - _SpecularHighlights: 1
- - _SrcBlend: 1
- - _Stencil: 0
- - _StencilComp: 8
- - _StencilOp: 0
- - _StencilReadMask: 255
- - _StencilWriteMask: 255
- - _UVSec: 0
- - _UseUIAlphaClip: 0
- - _ZWrite: 1
- m_Colors:
- - _Color: {r: 1, g: 1, b: 1, a: 1}
- - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- - _halfSize: {r: 289.5, g: 211, b: 0, a: 0}
- - _r: {r: 20, g: 0, b: 0, a: 0}
- - _rect2props: {r: 5.0000305, g: -5.000061, b: 346.8359, a: 353.90698}
---- !u!21 &1792512907
-Material:
- serializedVersion: 6
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: IndependentCornersMaterial(Clone)
- m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
- m_ShaderKeywords:
- m_LightmapFlags: 4
- m_EnableInstancingVariants: 0
- m_DoubleSidedGI: 0
- m_CustomRenderQueue: -1
- stringTagMap: {}
- disabledShaderPasses: []
- m_SavedProperties:
- serializedVersion: 3
- m_TexEnvs:
- - _BumpMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailAlbedoMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailMask:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailNormalMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _EmissionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MainTex:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MetallicGlossMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _OcclusionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _ParallaxMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- m_Floats:
- - _BumpScale: 1
- - _ColorMask: 15
- - _Cutoff: 0.5
- - _DetailNormalMapScale: 1
- - _DstBlend: 0
- - _GlossMapScale: 1
- - _Glossiness: 0.5
- - _GlossyReflections: 1
- - _Metallic: 0
- - _Mode: 0
- - _OcclusionStrength: 1
- - _Parallax: 0.02
- - _SmoothnessTextureChannel: 0
- - _SpecularHighlights: 1
- - _SrcBlend: 1
- - _Stencil: 0
- - _StencilComp: 8
- - _StencilOp: 0
- - _StencilReadMask: 255
- - _StencilWriteMask: 255
- - _UVSec: 0
- - _UseUIAlphaClip: 0
- - _ZWrite: 1
- m_Colors:
- - _Color: {r: 1, g: 1, b: 1, a: 1}
- - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- - _halfSize: {r: 740, g: 388, b: 0, a: 0}
- - _r: {r: 20, g: 20, b: 0, a: 0}
- - _rect2props: {r: 0.000061035156, g: -10.000122, b: 790.5454, a: 790.5454}
---- !u!21 &1826292184
-Material:
- serializedVersion: 6
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_Name: IndependentCornersMaterial(Clone)
- m_Shader: {fileID: 4800000, guid: d3beb88e61f88ca4393acdefb005fa70, type: 3}
- m_ShaderKeywords:
- m_LightmapFlags: 4
- m_EnableInstancingVariants: 0
- m_DoubleSidedGI: 0
- m_CustomRenderQueue: -1
- stringTagMap: {}
- disabledShaderPasses: []
- m_SavedProperties:
- serializedVersion: 3
- m_TexEnvs:
- - _BumpMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailAlbedoMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailMask:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _DetailNormalMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _EmissionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MainTex:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _MetallicGlossMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _OcclusionMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- - _ParallaxMap:
- m_Texture: {fileID: 0}
- m_Scale: {x: 1, y: 1}
- m_Offset: {x: 0, y: 0}
- m_Floats:
- - _BumpScale: 1
- - _ColorMask: 15
- - _Cutoff: 0.5
- - _DetailNormalMapScale: 1
- - _DstBlend: 0
- - _GlossMapScale: 1
- - _Glossiness: 0.5
- - _GlossyReflections: 1
- - _Metallic: 0
- - _Mode: 0
- - _OcclusionStrength: 1
- - _Parallax: 0.02
- - _SmoothnessTextureChannel: 0
- - _SpecularHighlights: 1
- - _SrcBlend: 1
- - _Stencil: 0
- - _StencilComp: 8
- - _StencilOp: 0
- - _StencilReadMask: 255
- - _StencilWriteMask: 255
- - _UVSec: 0
- - _UseUIAlphaClip: 0
- - _ZWrite: 1
- m_Colors:
- - _Color: {r: 1, g: 1, b: 1, a: 1}
- - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- - _halfSize: {r: 740, g: 388, b: 0, a: 0}
- - _r: {r: 20, g: 20, b: 0, a: 0}
- - _rect2props: {r: 0.000061035156, g: -10.000122, b: 790.5454, a: 790.5454}
--- !u!1 &1944211662
GameObject:
m_ObjectHideFlags: 0
@@ -1092,567 +686,81 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 48.593002, y: -4.8190002, z: -6.4140005}
---- !u!1001 &3342506722068615057
-PrefabInstance:
+--- !u!1 &2034365435
+GameObject:
m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 1678571401}
- m_Modifications:
- - target: {fileID: 3342506722007875022, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_Name
- value: Message
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875056, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_Material
- value:
- objectReference: {fileID: 911898334}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_Pivot.x
- value: 0.5
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_Pivot.y
- value: 0.5
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_RootOrder
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_AnchorMax.x
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_AnchorMin.x
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 280
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_SizeDelta.y
- value: 44
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalRotation.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalRotation.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: -717
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: -76
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506722007875057, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 3342506723879539847, guid: 10e54cf0bec9cbc4b94d1d40e437f87c,
- type: 3}
- propertyPath: m_Material
- value:
- objectReference: {fileID: 381452049}
- m_RemovedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: 10e54cf0bec9cbc4b94d1d40e437f87c, type: 3}
---- !u!224 &3728196982312891800 stripped
-RectTransform:
- m_CorrespondingSourceObject: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- m_PrefabInstance: {fileID: 5526612273759379022}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
---- !u!1001 &5526612273759379022
-PrefabInstance:
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 2034365436}
+ - component: {fileID: 2034365438}
+ - component: {fileID: 2034365437}
+ m_Layer: 5
+ m_Name: Text
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &2034365436
+RectTransform:
m_ObjectHideFlags: 0
- serializedVersion: 2
- m_Modification:
- m_TransformParent: {fileID: 1678571401}
- m_Modifications:
- - target: {fileID: 380274271114832883, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 380274271114832883, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 380274271114832883, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5413612838137619147, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612271950846019, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612271950846019, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612271950846019, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612271950846019, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272056919338, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272056919338, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272056919338, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272056919338, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272056919338, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272165583874, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272278939589, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272278939589, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272278939589, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272278939589, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272284308391, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272284308391, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272284308391, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272284308391, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272284308391, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272308430552, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272308430552, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272308430552, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272308430552, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272308430552, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272378935001, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272485525649, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272485525649, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272485525649, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272547339881, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272547339881, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272547339881, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272547339881, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272547339881, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272547339881, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272623978842, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272623978842, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272623978842, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272623978842, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612272745412620, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_Material
- value:
- objectReference: {fileID: 1792512907}
- - target: {fileID: 5526612272941488697, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273137644949, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273137644949, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273137644949, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273137644949, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273367387532, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273367387532, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273367387532, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273367387532, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273750354142, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273750354142, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273750354142, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273750354142, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273772399091, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_Material
- value:
- objectReference: {fileID: 393975162}
- - target: {fileID: 5526612273925040422, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273925040422, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273925040422, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273925040422, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 5526612273925040422, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996305, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_Name
- value: NewRouteDetailPanel
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_Pivot.x
- value: 0.5
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_Pivot.y
- value: 0.5
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_RootOrder
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.x
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMax.y
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchorMin.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_SizeDelta.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalPosition.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalRotation.w
- value: 1
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalRotation.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalRotation.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalRotation.z
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_AnchoredPosition.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalEulerAnglesHint.x
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalEulerAnglesHint.y
- value: 0
- objectReference: {fileID: 0}
- - target: {fileID: 9155624476384996310, guid: 5cd080a427081d74286771a7001f2ffa,
- type: 3}
- propertyPath: m_LocalEulerAnglesHint.z
- value: 0
- objectReference: {fileID: 0}
- m_RemovedComponents: []
- m_SourcePrefab: {fileID: 100100000, guid: 5cd080a427081d74286771a7001f2ffa, type: 3}
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2034365435}
+ 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_Children: []
+ m_Father: {fileID: 1174874345}
+ m_RootOrder: 0
+ 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: 0, y: 190}
+ m_SizeDelta: {x: 160, y: 30}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &2034365437
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2034365435}
+ 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.94117653, g: 0.94117653, b: 0.94117653, a: 1}
+ m_RaycastTarget: 1
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_FontData:
+ m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+ m_FontSize: 20
+ m_FontStyle: 0
+ m_BestFit: 0
+ m_MinSize: 2
+ m_MaxSize: 40
+ m_Alignment: 4
+ m_AlignByGeometry: 0
+ m_RichText: 1
+ m_HorizontalOverflow: 0
+ m_VerticalOverflow: 0
+ m_LineSpacing: 1
+ m_Text: New Text
+--- !u!222 &2034365438
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 2034365435}
+ m_CullTransparentMesh: 0
diff --git a/Assets/Scripts/App.cs b/Assets/Scripts/App.cs
index b8c0d8a4..8a389621 100644
--- a/Assets/Scripts/App.cs
+++ b/Assets/Scripts/App.cs
@@ -18,7 +18,7 @@ public delegate void ChangeLanguageDelegate();
public static class App
{
- public static string Host = "http://192.168.0.101:5085/";
+ public static string Host = "http://192.168.0.101:5084/";
public static string AppVersion = Application.version;
diff --git a/Assets/UniWebView.meta b/Assets/UniWebView.meta
new file mode 100644
index 00000000..772685ae
--- /dev/null
+++ b/Assets/UniWebView.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 92454175c62504ab5bf7128917b56362
+folderAsset: yes
+timeCreated: 1490878496
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/CHANGELOG.md b/Assets/UniWebView/CHANGELOG.md
new file mode 100644
index 00000000..b9fae950
--- /dev/null
+++ b/Assets/UniWebView/CHANGELOG.md
@@ -0,0 +1,1384 @@
+# Release Note
+
+### 4.10.3 (3 Dec, 2021)
+
+#### Fix
+
+* A crash when scrolling outside of the web view area when `SetTransparencyClickingThroughEnabled` is set to `true`.
+* Now Android supports RTL languages layout.
+
+### 4.10.2 (25 Nov, 2021)
+
+#### Fix
+
+* Now UniWebView also supports NTLM authentication method.
+* Uses the intent-based way to detect availability of SafeBrowsing. Now the `IsSafeBrowsingSupported` API would give back a more accurate result.
+* Removes the requirement of Gradle plugin version of 4.0.1 or later. This fixes some Android build errors on earlier Unity versions which ships with an older Gradle Plugin. However, if you are using `UniWebViewSafeBrowsing` and setting the Target API Level to Android 11 (Level 30), you still need a newer version of Unity and follow the [related guide](https://docs.uniwebview.com/guide/safe-browsing.html) to add `queries` to the `AndroidManifest.xml` file.
+* An issue that the toolbar on iOS can be clicked through to the Unity scene.
+
+
+### 4.10.1 (11 Nov, 2021)
+
+#### Fix
+
+* An issue that `UniWebViewSafeBrowsing.IsSafeBrowsingSupported` may always return `false` wrongly when build against Android API 30 or above.
+
+### 4.10.0 (2 Oct, 2021)
+
+#### Add
+
+* Add option to support for using regular expression matching in `AddDownloadURL` or `AddDownloadMIMEType` methods.
+
+#### Fix
+
+* Now the `Load` method allows a `null` URL on Android instead of crash the game.
+* The file downloading respects the SSL exception settings of the host web view now.
+* The UniWebView message system now support URLs without authority part. Now, a URL like `myscheme:this_is_the_message?foo=bar` can be parsed without problem.
+
+### 4.9.0 (26 Jul, 2021)
+
+#### Add
+
+* New feature Transparency Clicking Through. Now you can use `SetTransparencyClickingThroughEnabled` and set the `BackgroundColor` of web view to a clear color to allow the user tap through the web view background. Those taps will be delivered to Unity scene.
+
+#### Fix
+
+* A potential issue that in some cases the `Hide` or `Show` method freeze the game for a few seconds.
+
+### 4.8.0 (19 Jul, 2021)
+
+#### Add
+
+* A method to disable the keyboard avoidance behavior on Android. It can prevent the web view layout changing when showing keyboard on Android.
+
+#### Fix
+
+* A gradle parser issue that ignores tab in a gradle node. This may lead some gradle build failing if a tab is used in the gradle file.
+* Now the SSL error exception works properly even for resource on the allowed page.
+* An issue which causes the video auto play not working on Android.
+
+### 4.7.0 (14 Jun, 2021)
+
+#### Add
+
+* A new method `SetTextZoom` on Android. It delegates setting to Android `WebSettings.setTextZoom` for the web view .
+* A new method `SetDownloadEventForContextMenuEnabled` on Android. This allows the image saving action in context menu also triggers the `OnFileDownloadStarted` and `OnFileDownloadFinished` events.
+
+#### Fix
+
+* A potential issue that on some old Android devices, the `Show` and `Hide` methods do not return correct value for the animation starting state.
+
+### 4.6.1 (8 May, 2021)
+
+#### Fix
+
+* An issue that extension format of `accept` field is not recognized when uploading through the input file form on Android. It causes the file picker not shown up in some cases.
+
+### 4.6.0 (4 Apr, 2021)
+
+#### Add
+
+* Methods to remove cookies under a URL and with a certain cookie name. It allows you to remove some of the stored cookies instead of clearing them all. Check the `RemoveCookies` and `RemoveCooke` methods respectively.
+
+### 4.5.1 (12 Mar, 2021)
+
+#### Fix
+
+* Now file uploading from Android contains a more readable file name in its `Content-Disposition` field.
+* An issue which causes external keyboard input is not valid while opening the web view on iOS.
+
+### 4.5.0 (17 Feb, 2021)
+
+#### Add
+
+* A new method to capture the current web view content and store it on a temporary folder on disk. Check `CaptureSnapshot` method and `OnCaptureSnapshotFinished` event for more.
+
+#### Fix
+
+* A potential issue that Safe Browsing crashes on certain devices without Chrome and Google Mobile Services (GMS) properly installed.
+
+### 4.4.0 (26 Jan, 2021)
+
+#### Add
+
+* Support download files in the general web view. Now, a download task will be triggered if the loading of resource cannot be rendered in place. See the [Downloading Files Guide](https://docs.uniwebview.com/guide/download-files.html) for more information.
+
+#### Fix
+
+* Now Jetifier is not required when Android exporting. If you need Jetifier for other third-party libraries, set it in UniWebView's setting panel.
+* The `Hide` method now correctly hides the web view even when a full-screen view is being used on Android.
+
+### 4.3.1 (18 Dec, 2020)
+
+#### Fix
+
+* An issue that causes the app to crash on iOS 9 and 10 when closing the web view.
+
+### 4.3.0 (14 Dec, 2020)
+
+#### Add
+
+* A property to check whether the Safe Browsing Mode is supported on the device. Some Android devices may not have Chrome installed, so Safe Browsing Mode is not supported. Instead of ignoring the requests of opening the web page in Safe Browsing Mode, now UniWebView will open it in the installed system browser. Use `UniWebViewSafeBrowsing.IsSafeBrowsingSupported` to get availability.
+* Add Assembly Definitions (`asmdef`) support. Now UniWebView will organize itself as an assembly. This should boost your compile-time in Unity Editor.
+
+#### Fix
+
+* Better support for multiple windows. The pop-up new web page window can pop another new window now.
+* Now the script should compile when using Unity Editor even on Linux.
+* A Gradle issue which causes error while exporting project when some certain customized Gradle templates are used.
+* A potential problem that accessing to web page cookie might freeze the app in older iOS devices or systems.
+
+### 4.2.0 (17 Oct, 2020)
+
+#### Add
+
+* A method `SetAllowUniversalAccessFromFileURLs` to allow local file loading by AJAX from a local HTML page. This ignores CORS checking on iOS `WKWebView` when loading both the page and resource locally.
+* Now you can enable the screen swipe gesture on iOS or macOS to perform back or forward navigation. Call `SetAllowBackForwardNavigationGestures` to allow it.
+* Add opening and closing events for multiple window. Now you can receive `OnMultipleWindowOpened` and `OnMultipleWindowClosed` event when a new window is opened or closed respectively.
+
+#### Fix
+
+* Now the Safe Browsing on Android only requires "androidx.browser:browser" version 1.0.0. This solves some conflicting with other "old and bad-behaved" packages which not upgrading to the latest dependency.
+* The JavaScript pop-up alert now has a better cancel button style. Also fixed the duplicated prompt text for input alert.
+* An issue which causes wrong parsing for Gradle build file when a string is defined inside a non-node block.
+
+### 4.1.0 (26 Sep, 2020)
+
+#### Add
+
+* Add a method to dismiss the `UniWebViewSafeBrowsing` on iOS. To close an opened safe browsing component, call the `Dismiss` method.
+* Build support for iOS 14 and Xcode 12.
+
+#### Fix
+
+* An issue that `BackgroundColor` property not working on Android.
+
+### 4.0.4 (1 Sep, 2020)
+
+#### Fix
+
+* An issue causes the web view does not show up until switching the app from background on some customized Android distribution.
+* Now setting for "Accept" header will give a warning since iOS does not support customize this header field.
+
+### 4.0.3 (18 Aug, 2020)
+
+#### Fix
+
+* Fix an issue that causes keyboard overlaying not handled correctly on Android.
+
+### 4.0.2 (14 Aug, 2020)
+
+#### Fix
+
+* Android X browser dependency ('androidx.browser:browser') for UniWebView Android can now be disabled in the preference panel. Turn it off if other plugins are already adding it for you.
+
+### 4.0.1 (12 Aug, 2020)
+
+#### Fix
+
+* A issue that prevents the Gradle file being processed correctly if inline comments are used.
+* Kotlin dependency for UniWebView Android can now be disabled in the preference panel. Turn it off if other plugins are already adding it for you.
+
+### 4.0.0 (1 Aug, 2020)
+
+::: danger
+4.0.0 is a major update of UniWebView. Although most of APIs in UniWebView 4 are compatible with UniWebView 3 and it should be easy enough to migrate, there are still a few breaking changes. For migration from UniWebView 3 in detail, visit the [Migration Guide](https://docs.uniwebview.com/guide/migration-guide.html). To know the highlight of the version, check [this page](https://docs.uniwebview.com/guide/version-highlight.html) for more.
+:::
+
+#### Add
+
+* **Safe Browsing Mode support.** Now UniWebView also contains a wrapper for [SFSafariViewController](https://developer.apple.com/documentation/safariservices/sfsafariviewcontroller) on iOS and [Custom Tabs](https://developers.google.com/web/android/custom-tabs) on Android. It allows you to browse web pages in a more browser-like level, including sharing cookies or credentials with the system browser. Check the [Safe Browsing guide](https://docs.uniwebview.com/guide/safe-browsing.html) for more information.
+* **Customizable built-in toolbar on iOS.** Now you can set the bar background color, button text, and the text color in the toolbar. Check the [Built-in Toolbar](https://docs.uniwebview.com/guide/built-in-toolbar.html) guide for more information.
+* **Add support for Unity 2020.1.** In the latest Unity version, it changes its way of handling native touch events. It may cause some functionality broken in UniWebView 3. UniWebView 4 uses itself in a new way to handle events to ensure working fine on all supported Unity versions. UniWebView 4 itself **supports from Unity 2018.3**.
+* **New Post Build Processing system and Preference Panel.** They provide a better way to define the dependencies and help you modify the "AndroidManifest.xml" file without touch it directly.
+* **Better permission model.** UniWebView now does not require the write external permission for uploading a photo from the gallery or camera to the web. It also adopts to permission models for Android 10. Other possible needed permission can be setup in the UniWebView Preference Panel.
+* An `OnPageProgressChanged` event which will be raised every time the loading progress changes in the web view.
+
+#### Fix
+
+* Now the web view resizes itself when a soft keyboard is showing up and about to cover the text input fields on the page. It keeps the text input visible.
+* UniWebView now always respects Unity setting of immersive mode on Android. The navigation bar will not jump out or flicker when showing the web view in an immersive mode.
+* Audio resource can stop correctly when the web view is closed now.
+* The alert pop-up and its text edit views for JavaScript confirm window or HTTP auth now have a better style and alignment.
+
+#### Deprecate
+
+* `SetImmersiveMode` is not needed anymore since the Unity setting is now always respected. This method will not do anything but give an error log instead.
+* `OnKeyCodeReceived` will not be called anymore since UniWebView is not intercepting any native events. Try Unity's `Input.GetKeyUp` in `Update` to get key code events instead.
+
+### 3.18.1 (4 Jul, 2020)
+
+#### Fix
+
+* A potential issue that the Android keyboard is not shown when switching back from a full screen view on Android 9 or above.
+* Now the Unity Editor support also allows displaying a web view when using the Device Simulator package.
+* An issue on iOS which causes the toolbar buttons placed in wrong position when switching back to the game while the web view is showing.
+
+### 3.18.0 (14 May, 2020)
+
+#### Add
+
+* An API to disable the whole user interaction of the web view. Call `SetUserInteractionEnabled(false)` on the web view if you do not want users to tap or scroll the web view.
+* Allow "Go Back" feature on a pop-up window if `SetSupportMultipleWindows` is set to `true`.
+
+#### Fix
+
+* An issue that the `OnPageFinished` event is not called on Android when loading an HTML string.
+
+### 3.17.0 (14 Apr, 2020)
+
+#### Add
+
+* A method to set the default font size on Android. This can help to reduce the influence of the user's display setting of the font scale. Use `SetDefaultFontSize` to give a more reasonable default font size based on the scale setting.
+* Now the visibility of navigation buttons (Go Back and Go Forward) on iOS toolbar can be set from Unity by `SetShowToolbarNavigationButtons`.
+
+#### Fix
+
+* A layout issue that breaks web view size when switching back to foreground when an action sheet shown in some cases.
+* The customized user agent string now also applies to the pop-up window when `SetSupportMultipleWindows` was called with `true`.
+* An issue that causes the new window cannot be dismissed correctly by `window.close()` on Android.
+* Now the text input views should be automatically scrolled up on Android when the soft keyboard displays and overlaps them.
+* The `ReferenceRectTransform` can calculate the correct final size and position for a non-default resolution setting for screen now.
+
+### 3.16.0 (5 Feb, 2020)
+
+#### Add
+
+* Support for `target="_blank"` links. By default, UniWebView will open the destination URL in the same page even it is attributed by a `_blank` target. If you want to open it in a new page, call `SetSupportMultipleWindows` with `true` and it will create a new web view above the current one to load the new request.
+
+#### Fix
+
+* Improve SSL error handling logic for Android to prevent warnings from Google.
+
+### 3.15.2 (8 Jan, 2020)
+
+#### Fix
+
+* URLs with "#" should be loaded correctly in iOS even the `skipEncoding` is not set to `true` in `Load` method.
+* The keyboard will be dismissed automatically when hiding the web view by calling `Hide` now.
+
+### 3.15.1 (18 Dec, 2019)
+
+#### Fix
+
+* Unity 2019.3 support. Fixed a problem which causes your app hanging and being killed at starting on iOS devices when building against Unity 2019.03 and without Xcode connected.
+* A possible crash when uploading and converting data between file choosers.
+* A potential issue that the Camera can be ignored when choosing images for uploading.
+
+### 3.15.0 (11 Dec, 2019)
+
+#### Add
+
+* A new method `ScrollTo` to scroll web view to a certain point.
+* Basic localization support for Android. Now the UniWebView related UI elements are localized for the following locals: `en`, `zh`, `zh-rTW`, `ja`, `ko`, `fr`, `de`, `es`, `ru`, `vi`, `pt`, `da`, `it`, `nl`, `sv`.
+
+#### Fix
+
+* Solve an issue that HTTP status cannot be retrieved correctly due to page loading events order are not correct on some Android systems.
+* Now the web view window will be pinned to top on macOS editor. This aligns the fact that the web view will always be the top-layer view on iOS and Android.
+
+### 3.14.0 (20 Nov, 2019)
+
+#### Add
+
+* New API `SetContentInsetAdjustmentBehavior` for setting the adjustment behavior which indicates how safe area insets. It is a wrapper for `contentInsetAdjustmentBehavior` on iOS.
+
+#### Fix
+
+* A crash when uploading a single picture taken by camera on some Android devices.
+* Unescape JavaScript result from Android. This helps get correct value when using `GetHTMLContent`.
+
+### 3.13.2 (29 Aug, 2019)
+
+#### Fix
+
+* An unintended symbol link to deprecated UIWebView on iOS. This prevents the deprecation warning when submitting an app to the App Store.
+
+### 3.13.1 (17 Aug, 2019)
+
+#### Fix
+
+* Enabled app cache support for web view on Android.
+
+### 3.13.0 (11 Jun, 2019)
+
+::: warning
+From 3.13.0, UniWebView supports from Unity 2017.3. This would help to reduce some legacy code and achieve more stable behaviors.
+If you need to continue use UniWebView 3 on Unity 5.6, Unity 2017.1 or Unity 2017.2, please keep to use UniWebView 3.12.1 or earlier.
+:::
+
+#### Add
+
+* Support on Android for uploading multiple files at the same time.
+
+#### Fix
+
+* The `RawMessage` of `UniWebViewMessage` is now not escaped any more. It will return exactly the original URL it receives. Meanwhile, the values in `Args` keep escaped as is.
+* An issue on iPad that the customized "Done" button text might be truncated in some cases.
+
+### 3.12.1 (26 Apr, 2019)
+
+#### Fix
+
+* An issue that web content does not go back to its original position after keyboard dismissed on iOS.
+* A crash when dismissing the web view on iOS 9 devices.
+* An issue causes some files cannot be selected when uploading with a form and the file chooser.
+
+### 3.12.0 (10 Apr, 2019)
+
+#### Add
+
+* Now you can use `SetDragInteractionEnabled` to disable the drag interaction on iPad running iOS 11 or above.
+
+#### Fix
+
+* A issue which causes the non full screen web view position moving in some cases when soft keyboard is showing up.
+
+### 3.11.0 (27 Mar, 2019)
+
+#### Add
+
+* Add `SetCalloutEnabled` method to control the behavior when the user taps an image or link with long press or force touch gesture. Now you can choose not to display the context callout menu.
+
+#### Fix
+
+* Now the navigation bar on Android will automatically hide immediately when the soft keyboard dismissed.
+* A workaround for regression on iOS 12 which causes selecting input fields in forms does not trigger the web view auto scrolling.
+
+### 3.10.2 (28 Feb, 2019)
+
+#### Fix
+
+* Fix a crash when selecting files from Downloads folder on certain Android devices when uploading.
+* Support showing web view in cutout mode in Android. Now UniWebView will follow the cutout render setting.
+
+### 3.10.1 (15 Feb, 2019)
+
+#### Fix
+
+* An issue that lack of a placeholder method which causes code not compile on Windows.
+
+### 3.10.0 (9 Feb, 2019)
+
+#### Add
+
+* A method to turn off automatically prompt alert showing when received an HTTP auth challenge from server. Use `SetAllowHTTPAuthPopUpWindow` to control the behavior.
+* Support open third party app with links of corresponding URL schemes. Now you can use a link to open other apps as long as it was registered.
+
+#### Fix
+
+* Performance issues when using some sync getter APIs on Android native side.
+
+### 3.9.2 (10 Jan, 2019)
+
+#### Fix
+
+* A problem that `SetZoomEnabled` not works correctly on iOS 12.
+* Now `CanGoBack`, `CanGoForward` and `Url` getters also work for single page app page.
+
+### 3.9.1 (18 Dec, 2018)
+
+#### Fix
+
+* A potential issue causes file chooser not response correctly when user dismiss the permission prompt without choosing.
+* Remove JavaScript Interface support for suppressing security warning from Google.
+
+### 3.9.0 (30 Nov, 2018)
+
+#### Add
+
+* A parameter for `Load` method to customize the read access URL for local file loading. It helps to load local resources under a different URL other than the current load page.
+
+#### Fix
+
+* A problem that read access URL not encoded correctly when special characters contained.
+* An issue causes crash when changing screen orientation by code when closing the web view with a toolbar displayed.
+
+### 3.8.1 (24 Oct, 2018)
+
+#### Fix
+
+* Fix a potential crash when reference `RectTransform` is used to determine web view frame, while there is no cavans for some reason on the transform.
+
+### 3.8.0 (5 Sep, 2018)
+
+#### Add
+
+* A method to allow file access from file URLs. This could solve some problem when request in a cross origin way from local pages. However, by setting it to true may cause some potential security issue, so make your choice at the risk.
+
+#### Fix
+
+* A problem causing immersive mode flickering in Android 8.x.
+* Post request on back button would work correctly.
+
+### 3.7.1 (26 Jun, 2018)
+
+#### Fix
+
+* A typo on "OnOrientationChanged" event. It was "OnOreintationChanged" and now we correct this issue in both code and documentation.
+
+### 3.7.0 (14 Jun, 2018)
+
+::: danger
+From Unity 2018, Gradle is used as the default build system, so we updated the integration method to make UniWebView works better in the new build system. If you are upgrading UniWebView from an earlier version, please refer to the [Adapting to AAR File](https://docs.uniwebview.com/guide/adapting-to-aar-file.html) documentation.
+:::
+
+#### Add
+
+* Compatible with Unity 2018.1 and gradle build system. Please note that you need some migration if you want to upgrade from an earlier version.
+
+### 3.6.1 (26 Apr, 2018)
+
+#### Fix
+
+* Compatible with Unity 2017.4. Now videos could be played correctly on Android devices in project exported by Unity 2017.4.
+
+---
+
+### 3.6.0 (3 Apr, 2018)
+
+#### Add
+
+* OnWebContentProcessTerminatedDelegate event is added. This event will be raised when iOS system stops loading the web content for some reason (Usually due to memory pressure). Prior UniWebView versions will try to refresh the page for you automatically. However, that would not fix the problem in most cases. This event provides a chance for you to free as much as resources and do reloading/handling as you need.
+
+#### Fix
+
+* As issue which causes web view frame not set properly when using prefab with a pre-set reference rectangle transform.
+* Some other minor internal fix.
+
+---
+
+### 3.5.2 (28 Feb, 2018)
+
+#### Fix
+
+* An issue which causes POST data from HTML form is missing when a customized header field is set on iOS.
+* Now customized header fields will be also added to image download requests on Android.
+
+---
+
+### 3.5.1 (31 Jan, 2018)
+
+#### Fix
+
+* A potential issue which may cause game unresponsive when switching back to foreground when a web view's game object or its parent objects are inactive.
+* An issue causes web view cannot be added to correct view in the first game run loop while splash screen is disabled.
+
+---
+
+### 3.5.0 (22 Jan, 2018)
+
+#### Add
+
+* Images from Internet now could be downloaded to Download folder in Android.
+* More consistent toolbar layout mechanism for toolbar on iOS. Now Auto Layout is used for layout toolbar, and `adjustInset` option works better.
+
+#### Fix
+
+* An issue which crashes macOS Editor when loading a local file in macOS 10.11 or earlier.
+* iOS context menu (action bar) now could cover toolbar properly.
+* A regression that makes setting text for toolbar done button title not working.
+* No need to add support-v4 package anymore to support uploading files to server.
+* Toolbar intersection with web view will now respect your frame setting first, then adjust its own height or top anchor.
+
+---
+
+### 3.4.2 (28 Dec, 2017)
+
+#### Fix
+
+* Use new message sending method between native and C# script. Now all messages could be received even when the web view game object is inactive.
+* Prevent `Init` with an empty name for security.
+
+---
+
+### 3.4.1 (12 Dec, 2017)
+
+#### Fix
+
+* Fix an issue on Android that getting some web view properties inside web view events may freeze the loading process.
+* The toolbar will not show automatically when you are using a prefab with "Use Toolbar" on. Now the toolbar will follow the show and hide state of the web view itself.
+* Fix an error in Editor when stop playing mode while a web view is being shown.
+* Upgrade to Android build SDK to API Level 26. (But still support from Android 5.0.)
+
+---
+
+### 3.4.0 (7 Nov, 2017)
+
+UniWebView now requires Xcode 9 with iOS SDK 11 to build. If you are still using Xcode 8 and iOS 10 SDK, please use UniWebView 3.3.x instead.
+
+#### Add
+
+* Better cookie management for iOS 11. On iOS 11, now UniWebView uses the newly added HTTP cookie store to get more stable cookie states.
+* Update web view layout and toolbar for iPhone X screen.
+* A method for printing current web view to a printer or air printer.
+
+#### Fix
+
+* A potential issue which may cause cookie lost during 301 or 302 redirecting.
+
+---
+
+### 3.3.2 (6 Oct, 2017)
+
+#### Fix
+
+* A crash when games are built against iOS 11 SDK and setting screen orientation with Unity API while the web view showing.
+
+---
+
+### 3.3.1 (6 Oct, 2017)
+
+#### Fix
+
+* A crash when setting screen orientation with Unity API while the web view showing.
+* Compatible with iOS 11 SDK and Xcode 9.
+* Due to a Unity High Sierra support issue, UniWebView 3 now require Unity 5.6.3 at least.
+
+---
+
+### 3.3.0 (9 Sep, 2017)
+
+#### Add
+
+* Support HTTP Basic and HTTP Digest authentication. A native pop-up will be displayed when there is a challenge to ask users to provide user name and password.
+* Support "intent" and "market" URL scheme. Now any valid "intent://" URL will be handled on Android. If target intent is not found, and there is no fallback URL provided, UniWebView will try to open the application page on Play Market. The "market://" URL will be navigated to Play Market.
+
+#### Fix
+
+* A problem which caused hidden web view also receiving touch event on Android when multiple web views are used.
+* Fix an issue which causes crash when uploading a camera captured photo on some Android devices.
+* Improvement on loading performance a bit on Android.
+
+---
+
+### 3.2.0 (3 Sep, 2017)
+
+#### Add
+
+* An option to URL or HTML string loading APIs to skip encoding, it is useful when you need to encode the url yourself instead of using the default encoding rule in UniWebView.
+* An option to cookie setting and getting APIs to skip encoding.
+
+#### Fix
+
+* An issue on Android which cause the default user agent cannot be retrieved correctly before the first request.
+* A memory leak on macOS Editor that web view window not get closed correctly.
+* More accurate scaling calculating in Zoomed Display mode on iOS.
+* Event touch could be handled correctly in Android when multiple web views shown now.
+* The URL encoding will not be applied to an already encoded input URL now.
+* The local file loading will not be loaded again in current view. This prevents a wrong behavior when loading a local page containing iframe tag.
+* The UniWebViewMessage will now respect the encoded url parameters and queries.
+
+---
+
+### 3.1.4 (17 Aug, 2017)
+
+#### Fix
+
+* Fix a problem which could cause web view alpha value not correct in some situation after transition with fade animation.
+* Fix position issue when showing web view with both edge and fade animation.
+
+---
+
+### 3.1.3 (9 Aug, 2017)
+
+#### Fix
+
+* A linking issue when running with a lower iOS SDK in Xcode.
+
+---
+
+### 3.1.2 (6 Aug, 2017)
+
+#### Fix
+
+* Now `SetWebContentsDebuggingEnabled` also works for macOS Editor build. Set it to true and you could right click in the web view in editor to show an inspector for debugging purpose.
+* Fix a flickering of navigation bar when loading a new page with immersive mode on Android.
+* A compiling error when build iOS target on a Windows editor.
+* A problem that built-in some schemes (`mailto`, `sms` and `tel`) not handled correctly on iOS and macOS.
+* Fix some deprecated methods of build system for Android.
+
+---
+
+### 3.1.1 (21 Jul, 2017)
+
+#### Fix
+
+* Local file URL with special characters now can be corrected encoded when loading.
+* Avoid unhandled Show method calling right after a Hide method. Now, the Hide method will be ignore if the web view is already hidden.
+* All three kinds of render mode for canvas (`ScreenSpaceOverlay`, `ScreenSpaceCamera` and `WorldSpace`) are now supported when using `RectTransform` to determine web view position and size.
+* Array query in `UniWebViewMessage` should work as expected. Now a query like "?a[]=1&a[]=2" will be parsed to "1,2" in the result message.
+
+---
+
+### 3.1.0 (14 Jul, 2017)
+
+#### Add
+
+* A helper method `UniWebViewHelper.PersistentDataURLForPath` to return a url string for files under `persistentDataPath`.
+* A method to enable user resizing for web view windows on macOS Editor.
+* Upgrade to new build tool chain to get better optimized binary for both iOS and Android targets.
+
+#### Fix
+
+* An issue which might cause url encoding returns wrong result when the original url contains space for other special characters.
+
+---
+
+### 3.0.1 (3 Jul, 2017)
+
+#### Fix
+
+* Setting cookies from JavaScript now could work correctly.
+* Allowing back compatibility for mixed content loading in Android.
+* Stopping loading now could trigger page loading error event.
+* Fully bit code support is now enabled for iOS build.
+
+---
+
+### 3.0.0 (27 Jun, 2017)
+
+::: danger
+3.0.0 is a major update of UniWebView. We rewrote the whole software from scratch to bring your experience of using a web view in Unity to a next level. Be caution it is not compatible with UniWebView 2, there are quite a few breaking changes in this version. For migration from UniWebView 2 in detail, visit our [Migration Guide](https://docs.uniwebview.com/guide/migration-guide.html) in documentation. To know the highlight of the version, check [this page](https://docs.uniwebview.com/guide/version-highlight.html) for more.
+:::
+
+#### Add
+
+* Better way to set frame of the web view. You can also use a reference `RectTransform` to set position and size.
+* Use `WKWebView` instead of `UIWebView` on iOS.
+* New pop-up style Unity Editor support on macOS. It is a fully functional tool for debugging purpose.
+* A new way to setup bridging between Unity and Cocoa native. Now there is no message sending delay.
+* You can now set the position of toolbar to top or bottom on iOS.
+* A leveled logger to log all UniWebView related information. See [UniWebViewLogger](https://docs.uniwebview.com/api/uniwebviewlogger.html) documentation for more.
+* Use a payload based callback API like transition and JavaScript related methods. It takes more data. See [UniWebViewNativeResultPayload]https://docs.uniwebview.com(/api/uniwebviewnativeresultpayload.html).
+* SSL exception for white listed domain. It is useful for a un-trusted certification but you still want to access.
+* A method to get current web view HTML content as a string.
+
+#### Fix
+
+* UniWebView Android no longer requires to be the main activity.
+* Uploading now could work properly on all supported devices.
+* The url scheme based message now supports UTF-8 and url encoding directly.
+* Now the customized header field will be existing for all requests until removed, not only the first one.
+
+---
+
+### 2.11.1 (22 May, 2017)
+
+#### Fix
+
+* A performance issue which causes the camera scene gets slow and laggy when used with Vuforia.
+
+---
+
+### 2.11.0 (28 Apr, 2017)
+
+#### Add
+
+* An API to ignore SSL cert error for a certain host in Android.
+* Add Firebase as built-in third party jar supporting.
+
+#### Fix
+
+* An icon used to demonstrate UniWebView.
+
+---
+
+### 2.10.0 (28 Feb, 2017)
+
+#### Add
+
+* An API to set allowing video auto-play. Call `SetAllowAutoPlay` on the web view for it. Please note that you also need to add an "auto-play" property in the video tag to enable auto-play in the web page.
+* An API to enable inline video play for iOS. By default, iOS video play will be pop to full-screen. By calling SetAllowInlinePlay with a true flag, you can play video inline on iOS. Please note you also need to add an "inline" property in your video tag to support it.
+* SetCookie and GetCookie methods to set and get a cookie for a specified URL and key.
+
+#### Fix
+
+* A potential issue that cleaning cookie did not work in some case. Since the logic of current cleaning cookie is not correct, we also marked the original CleanCookie method to be obsoleted. You should now use SetCookie method to set a cookie value to empty for cleaning purpose.
+
+---
+
+### 2.9.2 (31 Jan, 2017)
+
+#### Fix
+
+* Pre-compiled jar file for Google VR activity.
+* An issue which causes web view cannot be opened correctly in some old Android devices.
+
+---
+
+### 2.9.1 (7 Nov, 2016)
+
+#### Fix
+
+* Add a null check for Android web view. This prevented a potential crash when navigating from javascript
+
+---
+
+### 2.9.0 (29 Sep, 2016)
+
+#### Add
+
+* Android remote web content debugging support. Now you can debug your web page in Android with Chrome. Just set `SetWebContentsDebuggingEnabled` with true to enable it.
+* Ability for loading page with overview mode for Android.
+
+#### Fix
+
+* Now all key down events are forwarded to Unity side by OnKeyDown callback in Android, even for TV remote controller and real device keys.
+
+---
+
+### 2.8.0 (29 Jul, 2016)
+
+#### Add
+
+* An option (`openLinksInExternalBrowser`) that all the links should be opened in an external browser or not. It will be useful if you want to open a URL in Mobile Safari or Chrome, instead of opening it in UniWebView. Default is false.
+* Now you can set the Done button title from Unity. Use `SetDoneButtonText` to customize the button title.
+* LGC SDK built-in support.
+
+---
+
+### 2.7.1 (3 Apr, 2016)
+
+#### Fix
+
+* Now the keyboard will also be dismissed in iOS when you call Hide on the web view with the keyboard showing.
+* A potential problem of activity type casting which might cause the app crashes when you use UniWebView with some other third party activity.
+* Add "singleTop" to launch mode in Android to prevent crash from multiple activity racing.
+
+---
+
+### 2.7.0 (11 Mar, 2016)
+
+#### Add
+
+* Add APIs for setting visibility of vertical and horizontal scroll bar of the web view.
+
+#### Fix
+
+* Update pre-compiled jar file for Prime31 and CardBoard, to be compatible to their latest SDKs.
+* Return an empty string for asset path string API, so it will compile even you switch to a platform that UniWebView does not support.
+* Fix a problem which prevents you from settings background color to transparent ones. It is a regression in version 2.6.0 and now it will not show a black background color anymore.
+* Not disabling hardware accelerating when Settings background color with alpha for Android. This would improve the performance of using a transparent background a lot.
+* A potential issue that will fail in type casting in Android activity type. This would improve the compatibility when working with other third party packages which tries to convert the Unity activity.
+
+---
+
+### 2.6.0 (15 Feb, 2016)
+
+#### Add
+
+* Rewrite video playing for Android web view. Now you could expect a better and stable video playback for both Youtube and Vimeo.
+
+#### Fix
+
+* Remove custom activity which is not needed anymore.
+
+---
+
+### 2.5.2 (27 Jan, 2016)
+
+#### Fix
+
+* Use UnityPlayerActivity instead. This makes UniWebView compatible with Unity 5.4 (current in beta).
+
+---
+
+### 2.5.1 (22 Jan, 2016)
+
+#### Fix
+
+* A crash issue in editor when you use AddUrlScheme.
+
+---
+
+### 2.5.0 (31 Dec, 2015)
+
+#### Add
+
+* Support for adding customize header field.
+* A helper method to generate streaming asset url for local pages.
+* Add AppFlyer jar file.
+
+#### Fix
+
+* Hide transition callback will work correctly for Android now.
+* Improve performance for OS X Editor version.
+
+---
+
+### 2.4.1 (11 Dec, 2015)
+
+#### Fix
+
+* Compatible with Unity 5.3.0's new OS X OpenGL Core for editor.
+* Clean some debug log.
+* Update default page in demo scene.
+* Set default user agent of Editor version to an iPhone agent. So you could get the mobile version of web view in Editor.
+
+::: danger
+Notice: Unity dropped Windows Phone 8 support officially from 5.3. UniWebView will not continue development for Windows Phone as well from this version.
+:::
+
+Reason: The amount of our Windows Phone users is very few compared to iOS and Android (it is less than 1% share according to report).
+However, if we want to to support Windows Store App with Windows Phone 8.1 SDK or Windows 10 SDK, it would take even more time than either of other platforms.
+
+Since the Windows Phone SDK itself is not backwards compatible, the transition from Windows 8 to 8.1 or 10 means we need to rewrite all code in the package.
+
+We have only limited resource. To make sure we could build the asset in a better quality for most of our users, we decided to focus back to iOS and Android only from next version.
+
+The current Windows Phone 8 support (UniWebViewWP.dll) will be kept in later versions of UniWebView for a while, but we are sorry that it doesn't seem to get updated anymore.
+
+---
+
+### 2.4.0 (4 Dec, 2015)
+
+#### Add
+
+* Built-in show/hide transition. You could now show or hide the web view with a transition effect. Currently we support fade in/out and transition from/to one of screen edges. Please take a look at reference of Show() and Hide() for more.
+ Add: Recreate new demo scenes as a better tutorial. Now most of the useful features are contained in the demo scenes, with fully commented script to show how to use them.
+* Now you can use "ESC" in OS X Editor to go back or close the web view.
+
+#### Fix
+
+* The color of iOS toolbar is now white. This fixed an issue that the clear background tool bar will become black if no web page is underneath.
+* Fix an issue which cause show tool bar property not working in some situation.
+* Adjust the behavior of insets, it is a preparation for later feature like insets translating. The API of insets remains the same now.
+
+#### Remove
+
+::: danger
+Notice: Unity will drop Windows Phone 8 support officially from 5.3. UniWebView will not continue development for Windows Phone as well from the next version.
+:::
+
+Reason: The amount of our Windows Phone users is very few compared to iOS and Android (it is less than 1% share according to report).
+However, if we want to to support Windows Store App with Windows Phone 8.1 SDK or Windows 10 SDK, it would take even more time than either of other platforms.
+
+Since the Windows Phone SDK itself is not backwards compatible, the transition from Windows 8 to 8.1 or 10 means we need to rewrite all code in the package.
+
+We have only limited resource. To make sure we could build the asset in a better quality for most of our users, we decided to focus back to iOS and Android only from next version.
+
+The current Windows Phone 8 support (UniWebViewWP.dll) will be kept in later versions of UniWebView for a while, but we are sorry that it doesn't seem to get updated anymore.
+
+---
+
+### 2.3.1 (5 Nov, 2015)
+
+#### Fix
+
+* An issue that script is missing in the prefab if you import the asset in a new version of Unity.
+* Compatibility for Unity 5.2.2 editor.
+
+---
+
+### 2.3.0 (13 Oct, 2015)
+
+#### Add
+
+* SMS link support for Android devices.
+
+---
+
+### 2.2.5 (8 Oct, 2015)
+
+#### Fix
+
+* Compatibility for Unity 5.2.1 editor.
+
+---
+
+### 2.2.4 (4 Oct, 2015)
+
+#### Fix
+
+* A status bar truncating issue which may appears on some Android devices when user show/hide the soft keyboard for several times.
+
+---
+
+### 2.2.3 (27 Sep, 2015)
+
+* An API to add trusted sites for Android. You will need to add your site url to the white list if you need to request the protected resources of Android devices (such as microphone or camera).
+* Add third party support for Craftar.
+
+#### Fix
+
+* A vulnerability that accept SSL connect even an error happens. Now UniWebView will use the default behavior of system and reject all un-trusted SSL connection. It will protect your web content from possible man-in-the-middle attacks. At the same time, it means you have to use a valid certification even if you are in test environment.
+
+* A null exception when input in a text field in Editor.
+
+---
+
+### 2.2.2 (12 Sep, 2015)
+
+#### Fix
+
+* An issue in Unity 5.2 which causes the web view not showing correctly in Unity Editor.
+* Alert compatibility for iOS in Unity 5.2.
+
+---
+
+### 2.2.1 (4 Sep, 2015)
+
+#### Add
+
+* PIs to get navigation state of current web view. Now you can use CanGoBack() and CanGoForward() to determine whether there is a page to go back or forward.
+
+#### Fix
+
+* Optimize performance for 64-bit OSX Editor version.
+
+---
+
+### 2.2.0 (22 Aug, 2015)
+
+#### Add
+
+* An API to set background color for the web view.
+
+#### Fix
+
+* The video will paused when app switched to background in Android devices now.
+* An issue causes the loading indicator not removed in Windows Phone 8 devices when dismiss the web view.
+* Add Neatplugin and RigidFace to default supported third party jar.
+
+---
+
+### 2.1.3 (30 Apr, 2015)
+
+#### Fix
+
+* File chooser for Android 5.0+.
+
+---
+
+### 2.1.2 (28 Apr, 2015)
+
+#### Fix
+
+* An issue on Android which causes screen remaining black when user taps back button when playing a full-screen Youtube video.
+
+---
+
+### 2.1.1 (26 Apr, 2015)
+
+#### Add
+
+* API for setting and getting alpha value.
+
+#### Fix
+
+* An issue which causes spinner not hidden when web view dismissed by done button.
+
+---
+
+### 2.1.0 (22 Apr, 2015)
+
+#### Add
+
+* Add immersive mode support for Android for API Level 19 and above.
+* Google CardBoard support. You can now find a pre-built CardBoard jar library.
+
+#### Fix
+
+* A crash which causes crash when setting insets to an invalid value.
+
+---
+
+### 2.0.0 (15 Mar, 2015)
+
+#### Add
+
+* Support for Windows Phone 8 and 8.1. Please note you need to add WebBrowser capability in Windows Phone's manifest file after exported from Unity.
+* Support for Unity 5. If you upgrade from UniWebView 1.x, you need to remove the old package and reimport again.
+* 64 bit support for Mac Editor version, since Unity 5 is now a 64-bit app.
+
+#### Fix
+
+* An issue which may cause the cache can not be cleaned completed in iOS.
+* A serialize issue which may cause editor crash in some occasion.
+
+::: danger
+Notice: This version is not compatible with Unity 4.x. If you need to use UniWebView on Unity 4.x, please use UniWebView 1.x instead. You can find more information about the earlier version on Asset Store: https://assetstore.unity3d.com/jp/#!/content/12476
+:::
+
+---
+
+### 1.9.0 (10 Feb, 2015)
+
+::: warning
+1.9.x will be the last version support Unity 4.x. Due to the huge difference between Unity 4 and 5, we decide to make a major update as well. Please keep an eye on our website (https://uniwebview.onevcat.com) to know more information about Unity 5 compatible version.
+:::
+
+#### Fix
+
+* An issue cause Mac Editor can not be used in 64bit environment.
+* Removed source folder and zipped them to avoid a potential compile error.
+* Removed a deprecated method to avoid compile error.
+
+---
+
+### 1.8.1 (9 Nov, 2014)
+
+#### Fix
+
+* Improve performance for Mac Editor a lot.
+* An issue which cause spinner can not hide when the web view removed by code from Unity.
+* Update Android build target.
+
+---
+
+### 1.8.0 (5 Nov, 2014)
+
+#### Fix
+
+Add: A method to change the user agent of the web view. Now you can use the SetUserAgent method to set customized user agent for the web view.
+Add: The Mac Editor now supports for Xcode 6.1 and OSX Yosemite.
+
+* An orientation issue when you set game as a landscape one, while the web view can not rotated to portrait on iOS 8.
+
+---
+
+### 1.7.3 (8 Oct, 2014)
+
+#### Fix
+
+* A issue which may cause crash on some Android device with system version 2.x.
+
+---
+
+### 1.7.2
+
+#### Add
+
+* An API for Android to enable wide view port support. Call SetUseWideViewPort(true) before loading any webpage containing viewport meta tag on Android to make it available.
+
+#### Fix
+
+* Now the viewport support for Android is disabled by default. Use the new added SetUseWideViewPort API to enable it if you are using viewport tag in your webpage.
+
+---
+
+### 1.7.1 (7 Oct, 2014)
+
+#### Add
+
+* Insets setting for portrait and landscape mode. You can now set different portrait and landscape inset easier. If you need show your web content in both orientation, you might want to use the new `InsetsForScreenOreitation` event. See demo code for the usage.
+
+#### Fix
+
+* Viewport issue for some Android devices. Now the html's viewport should work correctly.
+* Web view truncated issue when the y position set to 0 on some Android devices. This is an advanced fix continuing for version 1.6.1.
+* An issue which causes auto-rotation not work on iOS 8 in some situation.
+* The position of toolbar and spinner should be correct on iOS 8 now.
+* A build error which stops the exported project compiling in Xcode 5 and iOS 7 SDK.
+
+---
+
+### 1.7.0 (26 Sep, 2014)
+
+::: danger
+This version dropped support for Unity 4.1.4. Now UniWebView starts from 4.2.2. And 1.7.x will be the last versions support Unity version below 4.4 (because there is a compile error in iOS 8 SDK in the exported Xcode project, which is annoying and makes the development harder).
+:::
+
+#### Add
+
+* UniWebViewHelper.screenHeight and UniWebViewHelper.screenWidth. You can retrieve the screen size in "point" instead of "pixel" with these two new API. See the migrate guide below for more.
+* "tel:" link support for Android. Now you can open the telephone UI by a link like "tel:12345678".
+* An example in demo file, to show how to handle the auto-orientation, with keeping the layout unchanged in both portrait and landscape.
+* iOS 8 and 5.5 inch iPhone 6 Plus support.
+
+#### Fix
+
+* The auto-orientation issue on iOS 8. Now it works for both iOS 8 SDK.
+* Trim the url leading and trailing spaces, making the behaviors the same for iOS and Android.
+
+#### Deprecate
+
+* UniWebViewHelper.RunningOnRetinaIOS() is now deprecated due to 3x size of iPhone 6 Plus. Use UniWebViewHelper.screenHeight and UniWebViewHelper.screenWidth to decide the insets for retina display now. See the migrate guide below for more.
+
+#### Remove
+
+* Remove the long-ago deprecated Dismiss().
+* Remove support for Unity 4.1.4.
+
+> Migrate Guide - If you are using UniWebViewHelper.RunningOnRetinaIOS() to decide the insets of UniWebView, you may want to look at the Migrate Guide:
+
+Due to introduction of iPhone 6 Plus and its new @3x scale, the old way would not work well. Now, all screen-size-based insets calculation for UniWebView should NOT use RunningOnRetinaIOS anymore. Instead you should use UniWebViewHelper.screenHeight and UniWebViewHelper.screenWidth and specify the point directly. For example, if you want to show a web view taking the upper half of screen, before version 1.7.0, it might be something like this:
+
+ int uiFactor = UniWebViewHelper.RunningOnRetinaIOS() ? 2 : 1;
+ int bottomInset = Screen.height / ( 2 * uiFactor );
+ _webView.insets = new UniWebViewEdgeInsets(0,0,bottomInset,0);
+
+Right now, with the new API, you can just use this:
+
+ int bottomInset = (int)(UniWebViewHelper.screenHeight * 0.5f);
+ _webView.insets = new UniWebViewEdgeInsets(0,0,bottomInset,0);
+
+No more ui factor and device-specified calculation needed.
+
+To make sure you can notice this change, the usage of RunningOnRetinaIOS() will cause an error now. You can just delete all usage of that, and change your insets code like the example above.
+
+---
+
+### 1.6.1 (2 Sep, 2014)
+
+#### Add
+
+* A pre-compiled package for Vuforia's QCARPlayerNativeActivity activity. You can find it under the /UniWebView/Source/ThirdPartyJar folder.
+
+#### Fix
+
+* An issue which cause the web view can not be full screen on some Android tablet.
+* Drop support for Android 2.2.x and earlier. So you can recompile the jar file with Android SDK 18 and later.
+
+---
+
+### 1.5.4 (29 Jul, 2014)
+
+#### Fix
+
+* Keyboard overlap issue when text filed on Android. Now the web content will be scrolled up automatically.
+
+---
+
+### 1.5.3 (16 Jul, 2014)
+
+#### Fix
+
+* A bug which causes an unexpected behavior when starting from other activities in Android.
+
+---
+
+### 1.5.2 (19 Jun, 2014)
+
+#### Fix
+
+* A bug when setting insets in some Android devices.
+
+---
+
+### 1.5.0 (1 Jun, 2014)
+
+#### Add
+
+* New download feature support for Android.
+* Compatibility with Unity 4.5.
+
+#### Fix
+
+* Update Android recompile guide for Unity 4.5.
+* Rotation problem when playing full screen video on iOS. Now the layout can work perfectly.
+
+---
+
+### 1.4.2 (30 Apr, 2014)
+
+#### Fix
+
+* Fix errors when export from Unity for the platforms not supported in UniWebView. Be caution, this fix does not make UniWebView supporting for other platforms than iOS and Android. It just disabled UniWebView code and suspended the errors.
+
+---
+
+### 1.4.1 (31 Mar, 2014)
+
+#### Add
+
+* An API for adding some javascript snippet to Android and iOS in runtime. Now you can dynamically add js code to your page when the game is running, instead of defining it in the web page before loading the web content.
+* API for cleaning a specified cookie, instead of cleaning them all.
+* A key down event on Android while the web view is activated.
+
+#### Fix
+
+* Improved the performance for Mac Editor.
+* Some other small issues.
+
+> The parameters of LoadBeginDelegate is changed from 1.4.0. There is now an url parameter in the delegate. If you are using web view.currentUrl in the corresponding event, now please use this parameter instead of that. The currentUrl is updated only when web page loading finished or failed now.
+
+---
+
+### 1.4.0 (12 Mar, 2014)
+
+#### Add
+
+* Add an API for clean cookies for the web view.
+* Add an API for stop current loading of the web view.
+
+#### Fix
+
+* Change the logic when loading web view, now UniWebView will send all loading begin event back to Unity.
+* An issue which cause Youtube video can not be automatically played in iOS.
+
+---
+
+### 1.3.0 (11 Feb, 2014)
+
+#### Add
+
+#### Fix
+
+New: Customize url schemes. You can now add and remove the url schemes UniWebView is using. By using new API of AddUrlScheme and RemoveUrlScheme, you can now integrate some more third party service easier.
+New: Support for location service of Android.
+
+* Some memory leak on iOS.
+
+---
+
+### 1.2.6 (21 Jan, 2014)
+
+#### Add
+
+* Add bouncesEnable property to Android. You can set the bounce effect for Android as well. Default is false, which means not show the bounce effect on Android, and not bounce the web view on iOS.
+* Add a refresh button in iOS's built-in tool bar.
+* Add zoom feature to both iOS and Android. Now you can set the zoomEnable property to let your users zoom-in or zoom-out web view by a pinch gesture.
+* Add Reload method, you can reload the current page now from code.
+
+#### Fix
+
+* Ignore the ssl check in Android, it is useful when you are testing your page with a certification you create yourself. Otherwise, you can not get pass from it.
+* Log order issue on Android. Now the create and show events can be logged correctly.
+
+---
+
+### 1.2.5 (9 Jan, 2014)
+
+#### Add
+
+* Add a bouncesEnable property to control the bounces when scroll the web view in iOS. The bounces effect is turned off by default, if you want it back, set this property to true.
+
+#### Fix
+
+* A problem causing the OnComplete event can not be raised correctly when load fails.
+* A problem which causes the name of web view game object being appended instead of replaced.
+* A problem with hiding the web view. Now the web view area could be clicked through correctly when hidden.
+
+#### Deprecate
+
+* `Dismiss()` is now deprecated, use `Hide()` to hide the web view.
+
+---
+
+### 1.2.3 (25 Dec, 2013)
+
+#### Add
+
+* Support for "mailto" link for Android.
+
+#### Fix
+
+* A potential issue which may cause unity scene turning to black when switching back to game while web view opened. It might shows on some old Android devices.
+* A problem which causes the source can not get compiled in Mono Develop.
+* Update the Dismiss method to let it work as designed in Mac Editor and Android devices. It now behaviors as making the web view hidden instead of close and destroy it. You can use Show to make it visible again after dismissing it.
+
+---
+
+### 1.2.2 (18 Dec, 2013)
+
+#### Add
+
+* An option to disable the back button on Android device. It is useful when you don't want users dismiss the web view (for example you want to use web view as part of your UI).
+
+#### Fix
+
+* Change the local file loading back to previous because the new method can not handle base url very well.
+* An issue which caused current url can not be retrieved properly for Android.
+
+---
+
+### 1.2.1 (12 Dec, 2013)
+
+#### Add
+
+* A property to get the current page url. You can know on which page now when you using UniWebView.
+* An event when the page begins to load. Not only the first page load from code, but also all the page loading by clicking links on the page.
+
+#### Fix
+
+* A mistake in transparent setting method in Android.
+* Background can be setting to transparent now in Android, from 2.x to 4.x (and later I think).
+* Make the local html load easier to use. Now just set the correct streaming asset path, and load. No more platform-specified step.
+
+---
+
+### 1.2.0 (7 Dec, 2013)
+
+#### Add
+
+* A spinner is added to web view, which will show when the webpage is under loading. The spinner is on by default, if you don't want it, you can set it not show by the SetShowSpinnerWhenLoading method of UniWebView.
+* We also added a text label in the spinner, to show some information to your users.
+* Added an OnEvalJavaScriptFinished event for evaluate js script. Now EvaluatingJavaScript will not return a value, but raise the event. So you can use the same API for both iOS and Android.
+* Local file load for Android 4.x.
+
+#### Fix
+
+* Rewrote all the Android native code, to make it working properly under Unity 4.3.
+* A problem which may cause unity game scene disappeared when game goes to background with web view opened in some old Android devices.
+
+---
+
+### 1.1.7 (2 Dec, 2013)
+
+#### Add
+
+* Support for loading local file in Android.
+
+#### Fix
+
+* A bug in the demo which causes an exception when you click the web page of the demo.
+* A problem which causes the plugin not working sometimes in Editor.
+
+---
+
+### 1.1.6 (28 Nov, 2013)
+
+#### Fix
+
+* A problem the file input tag can not trigger a file chooser in Android.
+
+---
+
+### 1.1.3 (21 Nov, 2013)
+
+#### Add
+
+* Add a method to the web view for loading from a html string.
+* Add some demo script to tell demonstrate how to load a local html file.
+
+#### Fix
+
+* A problem when users close the web view with soft keyboard showing in Android.
+
+---
+
+### 1.1.2 (16 Nov, 2013)
+
+#### Add
+
+* A better and more interesting demo scene to explain how to make the UniWebView work.
+
+#### Fix
+
+* A problem which cause the keyboard not working on Android.
+* A rotation issue which cause the web view can not rotate correctly in iOS.
+
+---
+
+### 1.1.0 (9 Nov, 2013)
+
+#### Add
+
+* Add Youtube video playing support for Android.
+* Add a tool bar to iOS.
+* The users can use back button (Android) or a native toolbar (iOS) to close the web view now.
+* Add an event to control whether the web view can be closed or not.
+
+#### Fix
+
+* Update the demo scene to make it clearer and more interesting.
+
+---
+
+### 1.0.1 (1 Nov, 2013)
+
+Init release
+
+
diff --git a/Assets/UniWebView/CHANGELOG.md.meta b/Assets/UniWebView/CHANGELOG.md.meta
new file mode 100644
index 00000000..63a59cae
--- /dev/null
+++ b/Assets/UniWebView/CHANGELOG.md.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f7ee8c3eb642344b08f4ceeb53d70cd1
+timeCreated: 1497057465
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Demo.meta b/Assets/UniWebView/Demo.meta
new file mode 100644
index 00000000..d0394e67
--- /dev/null
+++ b/Assets/UniWebView/Demo.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 565d674726c3d499cade2709dd955ad0
+folderAsset: yes
+timeCreated: 1536753564
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Demo/UniWebViewDemo.unity b/Assets/UniWebView/Demo/UniWebViewDemo.unity
new file mode 100644
index 00000000..6b7aa963
--- /dev/null
+++ b/Assets/UniWebView/Demo/UniWebViewDemo.unity
@@ -0,0 +1,337 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!29 &1
+OcclusionCullingSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_OcclusionBakeSettings:
+ smallestOccluder: 5
+ smallestHole: 0.25
+ backfaceThreshold: 100
+ m_SceneGUID: 00000000000000000000000000000000
+ m_OcclusionCullingData: {fileID: 0}
+--- !u!104 &2
+RenderSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 9
+ m_Fog: 0
+ m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+ m_FogMode: 3
+ m_FogDensity: 0.01
+ m_LinearFogStart: 0
+ m_LinearFogEnd: 300
+ m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+ m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+ m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
+ m_AmbientIntensity: 1
+ m_AmbientMode: 3
+ m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
+ m_SkyboxMaterial: {fileID: 0}
+ m_HaloStrength: 0.5
+ m_FlareStrength: 1
+ m_FlareFadeSpeed: 3
+ m_HaloTexture: {fileID: 0}
+ m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
+ m_DefaultReflectionMode: 0
+ m_DefaultReflectionResolution: 128
+ m_ReflectionBounces: 1
+ m_ReflectionIntensity: 1
+ m_CustomReflection: {fileID: 0}
+ m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
+ m_UseRadianceAmbientProbe: 0
+--- !u!157 &3
+LightmapSettings:
+ m_ObjectHideFlags: 0
+ serializedVersion: 11
+ m_GIWorkflowMode: 1
+ m_GISettings:
+ serializedVersion: 2
+ m_BounceScale: 1
+ m_IndirectOutputScale: 1
+ m_AlbedoBoost: 1
+ m_EnvironmentLightingMode: 0
+ m_EnableBakedLightmaps: 0
+ m_EnableRealtimeLightmaps: 0
+ m_LightmapEditorSettings:
+ serializedVersion: 12
+ m_Resolution: 2
+ m_BakeResolution: 40
+ m_AtlasSize: 1024
+ m_AO: 0
+ m_AOMaxDistance: 1
+ m_CompAOExponent: 1
+ m_CompAOExponentDirect: 0
+ m_ExtractAmbientOcclusion: 0
+ m_Padding: 2
+ m_LightmapParameters: {fileID: 0}
+ m_LightmapsBakeMode: 1
+ m_TextureCompression: 1
+ m_FinalGather: 0
+ m_FinalGatherFiltering: 1
+ m_FinalGatherRayCount: 256
+ m_ReflectionCompression: 2
+ m_MixedBakeMode: 2
+ m_BakeBackend: 0
+ m_PVRSampling: 1
+ m_PVRDirectSampleCount: 32
+ m_PVRSampleCount: 500
+ m_PVRBounces: 2
+ m_PVREnvironmentSampleCount: 500
+ m_PVREnvironmentReferencePointCount: 2048
+ m_PVRFilteringMode: 2
+ m_PVRDenoiserTypeDirect: 0
+ m_PVRDenoiserTypeIndirect: 0
+ m_PVRDenoiserTypeAO: 0
+ m_PVRFilterTypeDirect: 0
+ m_PVRFilterTypeIndirect: 0
+ m_PVRFilterTypeAO: 0
+ m_PVREnvironmentMIS: 0
+ m_PVRCulling: 1
+ m_PVRFilteringGaussRadiusDirect: 1
+ m_PVRFilteringGaussRadiusIndirect: 5
+ m_PVRFilteringGaussRadiusAO: 2
+ m_PVRFilteringAtrousPositionSigmaDirect: 0.5
+ m_PVRFilteringAtrousPositionSigmaIndirect: 2
+ m_PVRFilteringAtrousPositionSigmaAO: 1
+ m_ExportTrainingData: 0
+ m_TrainingDataDestination: TrainingData
+ m_LightProbeSampleCountMultiplier: 4
+ m_LightingDataAsset: {fileID: 0}
+ m_UseShadowmask: 1
+--- !u!196 &4
+NavMeshSettings:
+ serializedVersion: 2
+ m_ObjectHideFlags: 0
+ m_BuildSettings:
+ serializedVersion: 2
+ agentTypeID: 0
+ agentRadius: 0.5
+ agentHeight: 2
+ agentSlope: 45
+ agentClimb: 0.4
+ ledgeDropHeight: 0
+ maxJumpAcrossDistance: 0
+ minRegionArea: 2
+ manualCellSize: 0
+ cellSize: 0.16666667
+ manualTileSize: 0
+ tileSize: 256
+ accuratePlacement: 0
+ debug:
+ m_Flags: 0
+ m_NavMeshData: {fileID: 0}
+--- !u!1001 &783622082
+PrefabInstance:
+ m_ObjectHideFlags: 0
+ serializedVersion: 2
+ m_Modification:
+ m_TransformParent: {fileID: 0}
+ m_Modifications:
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_RootOrder
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalPosition.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalPosition.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalPosition.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalRotation.w
+ value: 1
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalRotation.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalRotation.y
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalRotation.z
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 4960404783511462, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+ propertyPath: m_LocalEulerAnglesHint.x
+ value: 0
+ objectReference: {fileID: 0}
+ - target: {fileID: 114939446366399424, guid: 7e3f16a6f6303419cbd9837f6c746de4,
+ type: 3}
+ propertyPath: urlOnStart
+ value: https://docs.uniwebview.com/guide/
+ objectReference: {fileID: 0}
+ - target: {fileID: 114939446366399424, guid: 7e3f16a6f6303419cbd9837f6c746de4,
+ type: 3}
+ propertyPath: frame.width
+ value: 844
+ objectReference: {fileID: 0}
+ - target: {fileID: 114939446366399424, guid: 7e3f16a6f6303419cbd9837f6c746de4,
+ type: 3}
+ propertyPath: frame.height
+ value: 390
+ objectReference: {fileID: 0}
+ - target: {fileID: 114939446366399424, guid: 7e3f16a6f6303419cbd9837f6c746de4,
+ type: 3}
+ propertyPath: referenceRectTransform
+ value:
+ objectReference: {fileID: 0}
+ m_RemovedComponents: []
+ m_SourcePrefab: {fileID: 100100000, guid: 7e3f16a6f6303419cbd9837f6c746de4, type: 3}
+--- !u!1 &890151856
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 890151859}
+ - component: {fileID: 890151858}
+ - component: {fileID: 890151857}
+ m_Layer: 0
+ m_Name: EventSystem
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!114 &890151857
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 890151856}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_HorizontalAxis: Horizontal
+ m_VerticalAxis: Vertical
+ m_SubmitButton: Submit
+ m_CancelButton: Cancel
+ m_InputActionsPerSecond: 10
+ m_RepeatDelay: 0.5
+ m_ForceModuleActive: 0
+--- !u!114 &890151858
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 890151856}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_FirstSelected: {fileID: 0}
+ m_sendNavigationEvents: 1
+ m_DragThreshold: 10
+--- !u!4 &890151859
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 890151856}
+ 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_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 2
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1313296981
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1313296986}
+ - component: {fileID: 1313296985}
+ - component: {fileID: 1313296982}
+ m_Layer: 0
+ m_Name: Main Camera
+ m_TagString: MainCamera
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!81 &1313296982
+AudioListener:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1313296981}
+ m_Enabled: 1
+--- !u!20 &1313296985
+Camera:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1313296981}
+ m_Enabled: 1
+ serializedVersion: 2
+ m_ClearFlags: 1
+ m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
+ m_projectionMatrixMode: 1
+ m_GateFitMode: 2
+ m_FOVAxisMode: 0
+ m_SensorSize: {x: 36, y: 24}
+ m_LensShift: {x: 0, y: 0}
+ m_FocalLength: 50
+ m_NormalizedViewPortRect:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 1
+ height: 1
+ near clip plane: 0.3
+ far clip plane: 1000
+ field of view: 60
+ orthographic: 1
+ orthographic size: 5
+ m_Depth: -1
+ m_CullingMask:
+ serializedVersion: 2
+ m_Bits: 4294967295
+ m_RenderingPath: -1
+ m_TargetTexture: {fileID: 0}
+ m_TargetDisplay: 0
+ m_TargetEye: 3
+ m_HDR: 1
+ m_AllowMSAA: 1
+ m_AllowDynamicResolution: 0
+ m_ForceIntoRT: 0
+ m_OcclusionCulling: 1
+ m_StereoConvergence: 10
+ m_StereoSeparation: 0.022
+--- !u!4 &1313296986
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1313296981}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: -10}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
diff --git a/Assets/UniWebView/Demo/UniWebViewDemo.unity.meta b/Assets/UniWebView/Demo/UniWebViewDemo.unity.meta
new file mode 100644
index 00000000..2683ee36
--- /dev/null
+++ b/Assets/UniWebView/Demo/UniWebViewDemo.unity.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 938c077f40a814d4584ce2ad17947cf3
+timeCreated: 1536753573
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Editor.meta b/Assets/UniWebView/Editor.meta
new file mode 100644
index 00000000..50aa7ecb
--- /dev/null
+++ b/Assets/UniWebView/Editor.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5f0047c1c8c8348de9d66b0496b353e1
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Editor/AndroidManifest.cs b/Assets/UniWebView/Editor/AndroidManifest.cs
new file mode 100644
index 00000000..79309f0a
--- /dev/null
+++ b/Assets/UniWebView/Editor/AndroidManifest.cs
@@ -0,0 +1,142 @@
+using System.Xml;
+using System.Collections;
+using System.Text;
+using System.IO;
+
+internal class UniWebViewAndroidXmlDocument : XmlDocument {
+ private string path;
+ protected XmlNamespaceManager nameSpaceManager;
+ public readonly string AndroidXmlNamespace = "http://schemas.android.com/apk/res/android";
+
+ public UniWebViewAndroidXmlDocument(string path) {
+ this.path = path;
+ using (var reader = new XmlTextReader(path)) {
+ reader.Read();
+ Load(reader);
+ }
+ nameSpaceManager = new XmlNamespaceManager(NameTable);
+ nameSpaceManager.AddNamespace("android", AndroidXmlNamespace);
+ }
+
+ public string Save() {
+ return SaveAs(path);
+ }
+
+ public string SaveAs(string path) {
+ using (var writer = new XmlTextWriter(path, new UTF8Encoding(false))) {
+ writer.Formatting = Formatting.Indented;
+ Save(writer);
+ }
+ return path;
+ }
+}
+
+internal class UniWebViewAndroidManifest : UniWebViewAndroidXmlDocument {
+ private readonly XmlElement ManifestElement;
+ private readonly XmlElement ApplicationElement;
+
+ public UniWebViewAndroidManifest(string path) : base(path) {
+ ManifestElement = SelectSingleNode("/manifest") as XmlElement;
+ ApplicationElement = SelectSingleNode("/manifest/application") as XmlElement;
+ }
+
+ private XmlAttribute CreateAndroidAttribute(string key, string value) {
+ XmlAttribute attr = CreateAttribute("android", key, AndroidXmlNamespace);
+ attr.Value = value;
+ return attr;
+ }
+
+ internal XmlNode GetActivityWithLaunchIntent() {
+ return
+ SelectSingleNode(
+ "/manifest/application/activity[intent-filter/action/@android:name='android.intent.action.MAIN' and "
+ + "intent-filter/category/@android:name='android.intent.category.LAUNCHER']",
+ nameSpaceManager);
+ }
+
+ internal bool SetUsesCleartextTraffic() {
+ bool changed = false;
+ if (ApplicationElement.GetAttribute("usesCleartextTraffic", AndroidXmlNamespace) != "true") {
+ ApplicationElement.SetAttribute("usesCleartextTraffic", AndroidXmlNamespace, "true");
+ changed = true;
+ }
+ return changed;
+ }
+
+ internal bool SetHardwareAccelerated() {
+ bool changed = false;
+ var activity = GetActivityWithLaunchIntent() as XmlElement;
+ if (activity.GetAttribute("hardwareAccelerated", AndroidXmlNamespace) != "true") {
+ activity.SetAttribute("hardwareAccelerated", AndroidXmlNamespace, "true");
+ changed = true;
+ }
+ return changed;
+ }
+
+ internal bool AddCameraPermission() {
+ bool changed = false;
+ if (SelectNodes("/manifest/uses-permission[@android:name='android.permission.CAMERA']", nameSpaceManager).Count == 0) {
+ var elem = CreateElement("uses-permission");
+ elem.Attributes.Append(CreateAndroidAttribute("name", "android.permission.CAMERA"));
+ ManifestElement.AppendChild(elem);
+ changed = true;
+ }
+ if (SelectNodes("/manifest/uses-feature[@android:name='android.hardware.camera']", nameSpaceManager).Count == 0) {
+ var elem = CreateElement("uses-feature");
+ elem.Attributes.Append(CreateAndroidAttribute("name", "android.hardware.camera"));
+ ManifestElement.AppendChild(elem);
+ changed = true;
+ }
+ return changed;
+ }
+
+ internal bool AddMicrophonePermission() {
+ bool changed = false;
+ if (SelectNodes("/manifest/uses-permission[@android:name='android.permission.MICROPHONE']", nameSpaceManager).Count == 0) {
+ var elem = CreateElement("uses-permission");
+ elem.Attributes.Append(CreateAndroidAttribute("name", "android.permission.MICROPHONE"));
+ ManifestElement.AppendChild(elem);
+ changed = true;
+ }
+ if (SelectNodes("/manifest/uses-feature[@android:name='android.hardware.microphone']", nameSpaceManager).Count == 0) {
+ var elem = CreateElement("uses-feature");
+ elem.Attributes.Append(CreateAndroidAttribute("name", "android.hardware.microphone"));
+ ManifestElement.AppendChild(elem);
+ changed = true;
+ }
+ return changed;
+ }
+
+ internal bool AddReadExternalStoragePermission() {
+ bool changed = false;
+ if (SelectNodes("/manifest/uses-permission[@android:name='android.permission.READ_EXTERNAL_STORAGE']", nameSpaceManager).Count == 0) {
+ var elem = CreateElement("uses-permission");
+ elem.Attributes.Append(CreateAndroidAttribute("name", "android.permission.READ_EXTERNAL_STORAGE"));
+ ManifestElement.AppendChild(elem);
+ changed = true;
+ }
+ return changed;
+ }
+
+ internal bool AddWriteExternalStoragePermission() {
+ bool changed = false;
+ if (SelectNodes("/manifest/uses-permission[@android:name='android.permission.WRITE_EXTERNAL_STORAGE']", nameSpaceManager).Count == 0) {
+ var elem = CreateElement("uses-permission");
+ elem.Attributes.Append(CreateAndroidAttribute("name", "android.permission.WRITE_EXTERNAL_STORAGE"));
+ ManifestElement.AppendChild(elem);
+ changed = true;
+ }
+ return changed;
+ }
+
+ internal bool AddAccessFineLocationPermission() {
+ bool changed = false;
+ if (SelectNodes("/manifest/uses-permission[@android:name='android.permission.ACCESS_FINE_LOCATION']", nameSpaceManager).Count == 0) {
+ var elem = CreateElement("uses-permission");
+ elem.Attributes.Append(CreateAndroidAttribute("name", "android.permission.ACCESS_FINE_LOCATION"));
+ ManifestElement.AppendChild(elem);
+ changed = true;
+ }
+ return changed;
+ }
+}
\ No newline at end of file
diff --git a/Assets/UniWebView/Editor/AndroidManifest.cs.meta b/Assets/UniWebView/Editor/AndroidManifest.cs.meta
new file mode 100644
index 00000000..ccf5d026
--- /dev/null
+++ b/Assets/UniWebView/Editor/AndroidManifest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d09054fcc76964295a49868566075973
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Editor/BuildGradle.cs b/Assets/UniWebView/Editor/BuildGradle.cs
new file mode 100644
index 00000000..7e2ad5d8
--- /dev/null
+++ b/Assets/UniWebView/Editor/BuildGradle.cs
@@ -0,0 +1,344 @@
+using System.Collections.Generic;
+using UnityEngine;
+using System.IO;
+using System.Text;
+using System;
+
+public class UniWebViewGradleConfig
+{
+ private UniWebViewGradleNode m_root;
+ private String m_filePath;
+ private UniWebViewGradleNode m_curNode;
+
+ public UniWebViewGradleNode ROOT
+ {
+ get { return m_root; }
+ }
+
+ public UniWebViewGradleConfig(string filePath)
+ {
+ string file = File.ReadAllText(filePath);
+ TextReader reader = new StringReader(file);
+
+ m_filePath = filePath;
+ m_root = new UniWebViewGradleNode("root");
+ m_curNode = m_root;
+
+ StringBuilder str = new StringBuilder();
+ bool inDoubleQuote = false;
+ bool inSingleQuote = false;
+
+ while (reader.Peek() > 0)
+ {
+ char c = (char)reader.Read();
+ switch (c)
+ {
+ // case '/':
+ // if (reader.Peek() == '/')
+ // {
+ // reader.Read();
+ // string comment = reader.ReadLine();
+ // Debug.Log("Comment line: " + comment);
+ // m_curNode.AppendChildNode(new UniWebViewGradleCommentNode(comment, m_curNode));
+ // }
+ // else
+ // {
+ // str.Append('/');
+ // }
+ // break;
+ case '\n':
+ case '\r':
+ {
+ var strf = FormatStr(str);
+ if (!string.IsNullOrEmpty(strf))
+ {
+ m_curNode.AppendChildNode(new UniWebViewGradleContentNode(strf, m_curNode));
+ }
+ }
+ str = new StringBuilder();
+ break;
+ case '\t':
+ {
+ var strf = FormatStr(str);
+ if (!string.IsNullOrEmpty(strf))
+ {
+ str.Append(" ");
+ }
+ break;
+ }
+ case '{':
+ {
+ if (inDoubleQuote || inSingleQuote) {
+ break;
+ }
+ var n = FormatStr(str);
+ if (!string.IsNullOrEmpty(n))
+ {
+ UniWebViewGradleNode node = new UniWebViewGradleNode(n, m_curNode);
+ m_curNode.AppendChildNode(node);
+ m_curNode = node;
+ }
+ }
+ str = new StringBuilder();
+ break;
+ case '}':
+ {
+ if (inDoubleQuote || inSingleQuote) {
+ break;
+ }
+ var strf = FormatStr(str);
+ if (!string.IsNullOrEmpty(strf))
+ {
+ m_curNode.AppendChildNode(new UniWebViewGradleContentNode(strf, m_curNode));
+ }
+ m_curNode = m_curNode.PARENT;
+ }
+ str = new StringBuilder();
+ break;
+ case '\"':
+ inDoubleQuote = !inDoubleQuote;
+ str.Append(c);
+ break;
+ case '\'':
+ inSingleQuote = !inSingleQuote;
+ str.Append(c);
+ break;
+ default:
+ str.Append(c);
+ break;
+ }
+ }
+
+ //Debug.Log("Gradle parse done!");
+ }
+
+ public void Save(string path = null)
+ {
+ if (path == null)
+ path = m_filePath;
+ File.WriteAllText(path, Print());
+ //Debug.Log("Gradle parse done! " + path);
+ }
+
+ private string FormatStr(StringBuilder sb)
+ {
+ string str = sb.ToString();
+ str = str.Trim();
+ return str;
+ }
+ public string Print()
+ {
+ StringBuilder sb = new StringBuilder();
+ printNode(sb, m_root, -1);
+ return sb.ToString();
+ }
+ private string GetLevelIndent(int level)
+ {
+ if (level <= 0) return "";
+ StringBuilder sb = new StringBuilder("");
+ for (int i = 0; i < level; i++)
+ {
+ sb.Append('\t');
+ }
+ return sb.ToString();
+ }
+ private void printNode(StringBuilder stringBuilder, UniWebViewGradleNode node, int level)
+ {
+ if (node.PARENT != null)
+ {
+ if (node is UniWebViewGradleCommentNode)
+ {
+ stringBuilder.Append("\n" + GetLevelIndent(level) + @"//" + node.NAME);
+ }
+ else
+ {
+ stringBuilder.Append("\n" + GetLevelIndent(level) + node.NAME);
+ }
+
+ }
+
+ if (!(node is UniWebViewGradleContentNode) && !(node is UniWebViewGradleCommentNode))
+ {
+ if (node.PARENT != null)
+ {
+ stringBuilder.Append(" {");
+ }
+ foreach (var c in node.CHILDREN)
+ {
+ printNode(stringBuilder, c, level + 1);
+ }
+ if (node.PARENT != null)
+ {
+ stringBuilder.Append("\n" + GetLevelIndent(level) + "}");
+ }
+ }
+ }
+}
+
+public class UniWebViewGradleNode
+{
+ protected List m_children = new List();
+ protected UniWebViewGradleNode m_parent;
+ protected String m_name;
+ public UniWebViewGradleNode PARENT
+ {
+ get { return m_parent; }
+ }
+
+ public string NAME
+ {
+ get { return m_name; }
+ }
+
+ public List CHILDREN
+ {
+ get { return m_children; }
+ }
+
+ public UniWebViewGradleNode(string name, UniWebViewGradleNode parent = null)
+ {
+ m_parent = parent;
+ m_name = name;
+ }
+
+ public void Each(Action f)
+ {
+ f(this);
+ foreach (var n in m_children)
+ {
+ n.Each(f);
+ }
+ }
+
+ public void AppendChildNode(UniWebViewGradleNode node)
+ {
+ if (m_children == null) m_children = new List();
+ m_children.Add(node);
+ node.m_parent = this;
+ }
+
+ public UniWebViewGradleNode TryGetNode(string path)
+ {
+ string[] subpath = path.Split('/');
+ UniWebViewGradleNode cnode = this;
+ for (int i = 0; i < subpath.Length; i++)
+ {
+ var p = subpath[i];
+ if (string.IsNullOrEmpty(p)) continue;
+ UniWebViewGradleNode tnode = cnode.FindChildNodeByName(p);
+ if (tnode == null)
+ {
+ Debug.Log("Can't find Node:" + p);
+ return null;
+ }
+
+ cnode = tnode;
+ tnode = null;
+ }
+
+ return cnode;
+ }
+
+ public UniWebViewGradleNode FindChildNodeByName(string name)
+ {
+ foreach (var n in m_children)
+ {
+ if (n is UniWebViewGradleCommentNode || n is UniWebViewGradleContentNode)
+ continue;
+ if (n.NAME == name)
+ return n;
+ }
+ return null;
+ }
+
+ public bool ReplaceContenStartsWith(string patten, string value)
+ {
+ foreach (var n in m_children)
+ {
+ if (!(n is UniWebViewGradleContentNode)) continue;
+ if (n.m_name.StartsWith(patten))
+ {
+ n.m_name = value;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public UniWebViewGradleContentNode ReplaceContenOrAddStartsWith(string patten, string value)
+ {
+ foreach (var n in m_children)
+ {
+ if (!(n is UniWebViewGradleContentNode)) continue;
+ if (n.m_name.StartsWith(patten))
+ {
+ n.m_name = value;
+ return (UniWebViewGradleContentNode)n;
+ }
+ }
+ return AppendContentNode(value);
+ }
+
+ ///
+ /// 添加子节点
+ ///
+ ///
+ ///
+ public UniWebViewGradleContentNode AppendContentNode(string content)
+ {
+ foreach (var n in m_children)
+ {
+ if (!(n is UniWebViewGradleContentNode)) continue;
+ if (n.m_name == content)
+ {
+ Debug.Log("UniWebViewGradleContentNode with " + content + " already exists!");
+ return null;
+ }
+ }
+ UniWebViewGradleContentNode cnode = new UniWebViewGradleContentNode(content, this);
+ AppendChildNode(cnode);
+ return cnode;
+ }
+
+
+ public bool RemoveContentNode(string contentPattern)
+ {
+ for(int i=0;i text.Contains("android.useAndroidX"));
+ bool hasJetifierProperty = lines.Any(text => text.Contains("android.enableJetifier"));
+
+ StringBuilder builder = new StringBuilder();
+
+ foreach(string each in lines) {
+ builder.AppendLine(each);
+ }
+
+ if (!hasAndroidXProperty) {
+ builder.AppendLine("android.useAndroidX=true");
+ }
+
+ if (!hasJetifierProperty && UniWebViewEditorSettings.GetOrCreateSettings().enableJetifier) {
+ builder.AppendLine("android.enableJetifier=true");
+ }
+
+ File.WriteAllText(filePath, builder.ToString());
+ }
+}
\ No newline at end of file
diff --git a/Assets/UniWebView/Editor/GradleProperty.cs.meta b/Assets/UniWebView/Editor/GradleProperty.cs.meta
new file mode 100644
index 00000000..0c95b969
--- /dev/null
+++ b/Assets/UniWebView/Editor/GradleProperty.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 62bf94600ac0f42c09fc261d7ab19e12
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Editor/UniWebView-CSharp.Editor.asmdef b/Assets/UniWebView/Editor/UniWebView-CSharp.Editor.asmdef
new file mode 100644
index 00000000..bf45cb2c
--- /dev/null
+++ b/Assets/UniWebView/Editor/UniWebView-CSharp.Editor.asmdef
@@ -0,0 +1,15 @@
+{
+ "name": "UniWebView-CSharp.Editor",
+ "references": [],
+ "includePlatforms": [
+ "Editor"
+ ],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": false,
+ "precompiledReferences": [],
+ "autoReferenced": true,
+ "defineConstraints": [],
+ "versionDefines": [],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Assets/UniWebView/Editor/UniWebView-CSharp.Editor.asmdef.meta b/Assets/UniWebView/Editor/UniWebView-CSharp.Editor.asmdef.meta
new file mode 100644
index 00000000..16d33ccf
--- /dev/null
+++ b/Assets/UniWebView/Editor/UniWebView-CSharp.Editor.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: b6d0e5b49a073436cbcd56804553ee20
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Editor/UniWebViewEditorSettings.cs b/Assets/UniWebView/Editor/UniWebViewEditorSettings.cs
new file mode 100644
index 00000000..eb18dfbb
--- /dev/null
+++ b/Assets/UniWebView/Editor/UniWebViewEditorSettings.cs
@@ -0,0 +1,114 @@
+using UnityEngine;
+using UnityEditor;
+using System.Collections.Generic;
+using System;
+using System.IO;
+
+class UniWebViewEditorSettings: ScriptableObject
+{
+ const string assetPath = "Assets/Editor/UniWebView/settings.asset";
+
+ [SerializeField]
+ internal bool usesCleartextTraffic = false;
+
+ [SerializeField]
+ internal bool writeExternalStorage = false;
+
+ [SerializeField]
+ internal bool accessFineLocation = false;
+
+ [SerializeField]
+ internal bool addsKotlin = true;
+
+ [SerializeField]
+ internal bool addsAndroidBrowser = true;
+
+ [SerializeField]
+ internal bool enableJetifier = true;
+
+ internal static UniWebViewEditorSettings GetOrCreateSettings() {
+ var settings = AssetDatabase.LoadAssetAtPath(assetPath);
+
+ if (settings == null) {
+ settings = ScriptableObject.CreateInstance();
+
+ Directory.CreateDirectory("Assets/Editor/UniWebView/");
+ AssetDatabase.CreateAsset(settings, assetPath);
+ AssetDatabase.SaveAssets();
+ }
+
+ return settings;
+ }
+
+ internal static SerializedObject GetSerializedSettings() {
+ return new SerializedObject(GetOrCreateSettings());
+ }
+}
+
+static class UniWebViewSettingsProvider {
+ static SerializedObject settings;
+
+ #if UNITY_2018_3_OR_NEWER
+ private class Provider : SettingsProvider {
+ public Provider(string path, SettingsScope scope = SettingsScope.User): base(path, scope) {}
+ public override void OnGUI(string searchContext) {
+ DrawPref();
+ }
+ }
+ [SettingsProvider]
+ static SettingsProvider UniWebViewPref() {
+ return new Provider("Preferences/UniWebView");
+ }
+ #else
+ [PreferenceItem("UniWebView")]
+ #endif
+ static void DrawPref() {
+ EditorGUIUtility.labelWidth = 320;
+ if (settings == null) {
+ settings = UniWebViewEditorSettings.GetSerializedSettings();
+ }
+ settings.Update();
+ EditorGUI.BeginChangeCheck();
+
+ EditorGUILayout.BeginVertical();
+ EditorGUILayout.LabelField("Android Manifest", EditorStyles.boldLabel);
+
+ EditorGUI.indentLevel++;
+ EditorGUILayout.PropertyField(settings.FindProperty("usesCleartextTraffic"));
+ DrawDetailLabel("If you need to load plain HTTP content.");
+
+ EditorGUILayout.PropertyField(settings.FindProperty("writeExternalStorage"));
+ DrawDetailLabel("If you need to download an image from web page.");
+
+ EditorGUILayout.PropertyField(settings.FindProperty("accessFineLocation"));
+ DrawDetailLabel("If you need to enable location support in web view.");
+ EditorGUI.indentLevel--;
+ EditorGUILayout.EndVertical();
+
+ EditorGUILayout.BeginVertical();
+ EditorGUILayout.LabelField("Gradle Build", EditorStyles.boldLabel);
+
+ EditorGUI.indentLevel++;
+
+ EditorGUILayout.PropertyField(settings.FindProperty("addsKotlin"));
+ DrawDetailLabel("Turn off this if another library is already adding Kotlin runtime.");
+ EditorGUILayout.PropertyField(settings.FindProperty("addsAndroidBrowser"));
+ DrawDetailLabel("Turn off this if another library is already adding 'androidx.browser:browser'.");
+ EditorGUILayout.PropertyField(settings.FindProperty("enableJetifier"));
+ DrawDetailLabel("Turn off this if you do not need Jetifier (for converting other legacy support dependencies to Android X).");
+
+ EditorGUILayout.EndVertical();
+
+ if (EditorGUI.EndChangeCheck()) {
+ settings.ApplyModifiedProperties();
+ AssetDatabase.SaveAssets();
+ }
+ EditorGUIUtility.labelWidth = 0;
+ }
+
+ static void DrawDetailLabel(string text) {
+ EditorGUI.indentLevel++;
+ EditorGUILayout.LabelField(text, EditorStyles.miniLabel);
+ EditorGUI.indentLevel--;
+ }
+}
\ No newline at end of file
diff --git a/Assets/UniWebView/Editor/UniWebViewEditorSettings.cs.meta b/Assets/UniWebView/Editor/UniWebViewEditorSettings.cs.meta
new file mode 100644
index 00000000..eb5f99ca
--- /dev/null
+++ b/Assets/UniWebView/Editor/UniWebViewEditorSettings.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a403a09e241a0480a957591ea60fb785
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Editor/UniWebViewPostBuildProcessor.cs b/Assets/UniWebView/Editor/UniWebViewPostBuildProcessor.cs
new file mode 100644
index 00000000..b3d2e832
--- /dev/null
+++ b/Assets/UniWebView/Editor/UniWebViewPostBuildProcessor.cs
@@ -0,0 +1,116 @@
+using UnityEditor;
+using UnityEditor.Android;
+using UnityEngine;
+using System.IO;
+using System.Text;
+
+
+class UniWebViewPostBuildProcessor : IPostGenerateGradleAndroidProject
+{
+ public int callbackOrder { get { return 1; } }
+ public void OnPostGenerateGradleAndroidProject(string path) {
+ Debug.Log(" UniWebView Post Build Scirpt is patching manifest file and gradle file...");
+ PatchAndroidManifest(path);
+ PatchBuildGradle(path);
+ PatchGradleProperty(path);
+ }
+
+ private void PatchAndroidManifest(string root) {
+ var manifestFilePath = GetManifestFilePath(root);
+ var manifest = new UniWebViewAndroidManifest(manifestFilePath);
+
+ var changed = false;
+
+ Debug.Log(" Set hardware accelerated to enable smooth web view experience and HTML5 support like video and canvas.");
+ changed = manifest.SetHardwareAccelerated() || changed;
+
+ var settings = UniWebViewEditorSettings.GetOrCreateSettings();
+ if (settings.usesCleartextTraffic) {
+ changed = manifest.SetUsesCleartextTraffic() || changed;
+ }
+ if (settings.writeExternalStorage) {
+ changed = manifest.AddWriteExternalStoragePermission() || changed;
+ }
+ if (settings.accessFineLocation) {
+ changed = manifest.AddAccessFineLocationPermission() || changed;
+ }
+
+ if (changed) {
+ manifest.Save();
+ }
+ }
+
+ private void PatchBuildGradle(string root) {
+ var gradleFilePath = GetGradleFilePath(root);
+ var config = new UniWebViewGradleConfig(gradleFilePath);
+
+ var kotlinPrefix = "implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:";
+ var kotlinVersion = "1.4.31'";
+
+ var browserPrefix = "implementation 'androidx.browser:browser:";
+ var browserVersion = "1.2.0'";
+
+ var settings = UniWebViewEditorSettings.GetOrCreateSettings();
+
+ var dependenciesNode = config.ROOT.FindChildNodeByName("dependencies");
+ if (dependenciesNode != null) {
+ // Add kotlin
+ if (settings.addsKotlin) {
+ dependenciesNode.ReplaceContenOrAddStartsWith(kotlinPrefix, kotlinPrefix + kotlinVersion);
+ Debug.Log(" Updated Kotlin dependency in build.gradle.");
+ }
+
+ // Add browser package
+ if (settings.addsAndroidBrowser) {
+ dependenciesNode.ReplaceContenOrAddStartsWith(browserPrefix, browserPrefix + browserVersion);
+ Debug.Log(" Updated Browser dependency in build.gradle.");
+ }
+ } else {
+ Debug.LogError("UniWebViewPostBuildProcessor didn't find the `dependencies` field in build.gradle.");
+ Debug.LogError("Although we can continue to add a `dependencies`, make sure you have setup Gradle and the template correctly.");
+
+ var newNode = new UniWebViewGradleNode("dependencies", config.ROOT);
+ if (settings.addsKotlin) {
+ newNode.AppendContentNode(kotlinPrefix + kotlinVersion);
+ }
+ if (settings.addsAndroidBrowser) {
+ newNode.AppendContentNode(browserPrefix + browserVersion);
+ }
+ newNode.AppendContentNode("implementation(name: 'UniWebView', ext:'aar')");
+ config.ROOT.AppendChildNode(newNode);
+ }
+ config.Save();
+ }
+
+ private void PatchGradleProperty(string root) {
+ var gradlePropertyFilePath = GetGradlePropertyFilePath(root);
+ UniWebViewGradlePropertyPatcher.Patch(gradlePropertyFilePath);
+ }
+
+ private string CombinePaths(string[] paths) {
+ var path = "";
+ foreach (var item in paths) {
+ path = Path.Combine(path, item);
+ }
+ return path;
+ }
+
+ private string GetManifestFilePath(string root) {
+ string[] comps = {root, "src", "main", "AndroidManifest.xml"};
+ return CombinePaths(comps);
+ }
+
+ private string GetGradleFilePath(string root) {
+ string[] comps = {root, "build.gradle"};
+ return CombinePaths(comps);
+ }
+
+ private string GetGradlePropertyFilePath(string root) {
+ #if UNITY_2019_3_OR_NEWER
+ string[] compos = {root, "..", "gradle.properties"};
+ #else
+ string[] compos = {root, "gradle.properties"};
+ #endif
+ return CombinePaths(compos);
+ }
+}
\ No newline at end of file
diff --git a/Assets/UniWebView/Editor/UniWebViewPostBuildProcessor.cs.meta b/Assets/UniWebView/Editor/UniWebViewPostBuildProcessor.cs.meta
new file mode 100644
index 00000000..40665c71
--- /dev/null
+++ b/Assets/UniWebView/Editor/UniWebViewPostBuildProcessor.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 59d4a8d85c95843719d8b9df823c3da3
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Interface.meta b/Assets/UniWebView/Interface.meta
new file mode 100644
index 00000000..f50095ca
--- /dev/null
+++ b/Assets/UniWebView/Interface.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: dc0f52a2d219347b1a6390b753d6ac97
+folderAsset: yes
+timeCreated: 1491898971
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Interface/UniWebViewAndroid.cs b/Assets/UniWebView/Interface/UniWebViewAndroid.cs
new file mode 100644
index 00000000..844f5aaa
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewAndroid.cs
@@ -0,0 +1,402 @@
+#if UNITY_ANDROID && !UNITY_EDITOR
+
+using UnityEngine;
+
+public class UniWebViewInterface {
+ private static readonly AndroidJavaClass plugin;
+ private static bool correctPlatform = Application.platform == RuntimePlatform.Android;
+
+ static UniWebViewInterface() {
+ var go = new GameObject("UniWebViewAndroidStaticListener");
+ go.AddComponent();
+ plugin = new AndroidJavaClass("com.onevcat.uniwebview.UniWebViewInterface");
+ CheckPlatform();
+ plugin.CallStatic("prepare");
+ }
+
+ public static void SetLogLevel(int level) {
+ CheckPlatform();
+ plugin.CallStatic("setLogLevel", level);
+ }
+
+ public static void Init(string name, int x, int y, int width, int height) {
+ CheckPlatform();
+ plugin.CallStatic("init", name, x, y, width, height);
+ }
+
+ public static void Destroy(string name) {
+ CheckPlatform();
+ plugin.CallStatic("destroy", name);
+ }
+
+ public static void Load(string name, string url, bool skipEncoding, string readAccessURL) {
+ CheckPlatform();
+ plugin.CallStatic("load", name, url);
+ }
+
+ public static void LoadHTMLString(string name, string html, string baseUrl, bool skipEncoding) {
+ CheckPlatform();
+ plugin.CallStatic("loadHTMLString", name, html, baseUrl);
+ }
+
+ public static void Reload(string name) {
+ CheckPlatform();
+ plugin.CallStatic("reload", name);
+ }
+
+ public static void Stop(string name) {
+ CheckPlatform();
+ plugin.CallStatic("stop", name);
+ }
+
+ public static string GetUrl(string name) {
+ CheckPlatform();
+ return plugin.CallStatic("getUrl", name);
+ }
+
+ public static void SetFrame(string name, int x, int y, int width, int height) {
+ CheckPlatform();
+ plugin.CallStatic("setFrame", name, x, y, width, height);
+ }
+
+ public static void SetPosition(string name, int x, int y) {
+ CheckPlatform();
+ plugin.CallStatic("setPosition", name, x, y);
+ }
+
+ public static void SetSize(string name, int width, int height) {
+ CheckPlatform();
+ plugin.CallStatic("setSize", name, width, height);
+ }
+
+ public static bool Show(string name, bool fade, int edge, float duration, bool useAsync, string identifier) {
+ CheckPlatform();
+ if (useAsync) {
+ plugin.CallStatic("showAsync", name, fade, edge, duration, identifier);
+ return true;
+ } else {
+ return plugin.CallStatic("show", name, fade, edge, duration, identifier);
+ }
+ }
+
+ public static bool Hide(string name, bool fade, int edge, float duration, bool useAsync, string identifier) {
+ CheckPlatform();
+ if (useAsync) {
+ plugin.CallStatic("hideAsync", name, fade, edge, duration, identifier);
+ return true;
+ } else {
+ return plugin.CallStatic("hide", name, fade, edge, duration, identifier);
+ }
+ }
+
+ public static bool AnimateTo(string name, int x, int y, int width, int height, float duration, float delay, string identifier) {
+ CheckPlatform();
+ return plugin.CallStatic("animateTo", name, x, y, width, height, duration, delay, identifier);
+ }
+
+ public static void AddJavaScript(string name, string jsString, string identifier) {
+ CheckPlatform();
+ plugin.CallStatic("addJavaScript", name, jsString, identifier);
+ }
+
+ public static void EvaluateJavaScript(string name, string jsString, string identifier) {
+ CheckPlatform();
+ plugin.CallStatic("evaluateJavaScript", name, jsString, identifier);
+ }
+
+ public static void AddUrlScheme(string name, string scheme) {
+ CheckPlatform();
+ plugin.CallStatic("addUrlScheme", name, scheme);
+ }
+
+ public static void RemoveUrlScheme(string name, string scheme) {
+ CheckPlatform();
+ plugin.CallStatic("removeUrlScheme", name, scheme);
+ }
+
+ public static void AddSslExceptionDomain(string name, string domain) {
+ CheckPlatform();
+ plugin.CallStatic("addSslExceptionDomain", name, domain);
+ }
+
+ public static void RemoveSslExceptionDomain(string name, string domain) {
+ CheckPlatform();
+ plugin.CallStatic("removeSslExceptionDomain", name, domain);
+ }
+
+ public static void AddPermissionTrustDomain(string name, string domain) {
+ CheckPlatform();
+ plugin.CallStatic("addPermissionTrustDomain", name, domain);
+ }
+
+ public static void RemovePermissionTrustDomain(string name, string domain) {
+ CheckPlatform();
+ plugin.CallStatic("removePermissionTrustDomain", name, domain);
+ }
+
+ public static void SetHeaderField(string name, string key, string value) {
+ CheckPlatform();
+ plugin.CallStatic("setHeaderField", name, key, value);
+ }
+
+ public static void SetUserAgent(string name, string userAgent) {
+ CheckPlatform();
+ plugin.CallStatic("setUserAgent", name, userAgent);
+ }
+
+ public static string GetUserAgent(string name) {
+ CheckPlatform();
+ return plugin.CallStatic("getUserAgent", name);
+ }
+
+ public static void SetAllowAutoPlay(bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setAllowAutoPlay", flag);
+ }
+
+ public static void SetAllowJavaScriptOpenWindow(bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setAllowJavaScriptOpenWindow", flag);
+ }
+
+ public static void SetAllowFileAccess(string name, bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setAllowFileAccess", name, flag);
+ }
+
+ public static void SetAllowFileAccessFromFileURLs(string name, bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setAllowFileAccessFromFileURLs", name, flag);
+ }
+
+ public static void SetAllowUniversalAccessFromFileURLs(bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setAllowUniversalAccessFromFileURLs", flag);
+ }
+
+ public static void SetEnableKeyboardAvoidance(bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setEnableKeyboardAvoidance", flag);
+ }
+
+ public static void SetJavaScriptEnabled(bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setJavaScriptEnabled", enabled);
+ }
+
+ public static void CleanCache(string name) {
+ CheckPlatform();
+ plugin.CallStatic("cleanCache", name);
+ }
+
+ public static void ClearCookies() {
+ CheckPlatform();
+ plugin.CallStatic("clearCookies");
+ }
+
+ public static void SetCookie(string url, string cookie, bool skipEncoding) {
+ CheckPlatform();
+ plugin.CallStatic("setCookie", url, cookie);
+ }
+
+ public static string GetCookie(string url, string key, bool skipEncoding) {
+ CheckPlatform();
+ return plugin.CallStatic("getCookie", url, key);
+ }
+
+ public static void RemoveCookies(string url, bool skipEncoding) {
+ CheckPlatform();
+ plugin.CallStatic("removeCookies", url);
+ }
+
+ public static void RemoveCookie(string url, string key, bool skipEncoding) {
+ CheckPlatform();
+ plugin.CallStatic("removeCookie", url, key);
+ }
+
+ public static void ClearHttpAuthUsernamePassword(string host, string realm) {
+ CheckPlatform();
+ plugin.CallStatic("clearHttpAuthUsernamePassword", host, realm);
+ }
+
+ public static void SetBackgroundColor(string name, float r, float g, float b, float a) {
+ CheckPlatform();
+ plugin.CallStatic("setBackgroundColor", name, r, g, b, a);
+ }
+
+ public static void SetWebViewAlpha(string name, float alpha) {
+ CheckPlatform();
+ plugin.CallStatic("setWebViewAlpha", name, alpha);
+ }
+
+ public static float GetWebViewAlpha(string name) {
+ CheckPlatform();
+ return plugin.CallStatic("getWebViewAlpha", name);
+ }
+
+ public static void SetShowSpinnerWhileLoading(string name, bool show) {
+ CheckPlatform();
+ plugin.CallStatic("setShowSpinnerWhileLoading", name, show);
+ }
+
+ public static void SetSpinnerText(string name, string text) {
+ CheckPlatform();
+ plugin.CallStatic("setSpinnerText", name, text);
+ }
+
+ public static bool CanGoBack(string name) {
+ CheckPlatform();
+ return plugin.CallStatic("canGoBack", name);
+ }
+
+ public static bool CanGoForward(string name) {
+ CheckPlatform();
+ return plugin.CallStatic("canGoForward", name);
+ }
+
+ public static void GoBack(string name) {
+ CheckPlatform();
+ plugin.CallStatic("goBack", name);
+ }
+ public static void GoForward(string name) {
+ CheckPlatform();
+ plugin.CallStatic("goForward", name);
+ }
+
+ public static void SetOpenLinksInExternalBrowser(string name, bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setOpenLinksInExternalBrowser", name, flag);
+ }
+
+ public static void SetHorizontalScrollBarEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setHorizontalScrollBarEnabled", name, enabled);
+ }
+
+ public static void SetVerticalScrollBarEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setVerticalScrollBarEnabled", name, enabled);
+ }
+
+ public static void SetBouncesEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setBouncesEnabled", name, enabled);
+ }
+
+ public static void SetZoomEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setZoomEnabled", name, enabled);
+ }
+
+ public static void SetUseWideViewPort(string name, bool use) {
+ CheckPlatform();
+ plugin.CallStatic("setUseWideViewPort", name, use);
+ }
+
+ public static void SetLoadWithOverviewMode(string name, bool overview) {
+ CheckPlatform();
+ plugin.CallStatic("setLoadWithOverviewMode", name, overview);
+ }
+
+ public static void SetImmersiveModeEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setImmersiveModeEnabled", name, enabled);
+ }
+
+ public static void SetUserInteractionEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setUserInteractionEnabled", name, enabled);
+ }
+
+ public static void SetTransparencyClickingThroughEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setTransparencyClickingThroughEnabled", name, enabled);
+ }
+
+ public static void SetWebContentsDebuggingEnabled(bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setWebContentsDebuggingEnabled", enabled);
+ }
+
+ public static void SetAllowHTTPAuthPopUpWindow(string name, bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setAllowHTTPAuthPopUpWindow", name, flag);
+ }
+
+ public static void Print(string name) {
+ CheckPlatform();
+ plugin.CallStatic("print", name);
+ }
+
+ public static void CaptureSnapshot(string name, string filename) {
+ CheckPlatform();
+ plugin.CallStatic("captureSnapshot", name, filename);
+ }
+
+ public static void ScrollTo(string name, int x, int y, bool animated) {
+ CheckPlatform();
+ plugin.CallStatic("scrollTo", name, x, y, animated);
+ }
+
+ public static void SetCalloutEnabled(string name, bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setCalloutEnabled", name, flag);
+ }
+
+ public static void SetSupportMultipleWindows(string name, bool flag) {
+ CheckPlatform();
+ plugin.CallStatic("setSupportMultipleWindows", name, flag);
+ }
+
+ public static void SetDefaultFontSize(string name, int size) {
+ CheckPlatform();
+ plugin.CallStatic("setDefaultFontSize", name, size);
+ }
+
+ public static void SetTextZoom(string name, int textZoom) {
+ CheckPlatform();
+ plugin.CallStatic("setTextZoom", name, textZoom);
+ }
+
+ public static float NativeScreenWidth() {
+ CheckPlatform();
+ return plugin.CallStatic("screenWidth");
+ }
+
+ public static float NativeScreenHeight() {
+ CheckPlatform();
+ return plugin.CallStatic("screenHeight");
+ }
+
+ public static void SetDownloadEventForContextMenuEnabled(string name, bool enabled) {
+ CheckPlatform();
+ plugin.CallStatic("setDownloadEventForContextMenuEnabled", name, enabled);
+ }
+
+ public static bool IsSafeBrowsingSupported() {
+ CheckPlatform();
+ return plugin.CallStatic("isSafeBrowsingSupported");
+ }
+
+ public static void SafeBrowsingInit(string name, string url) {
+ CheckPlatform();
+ plugin.CallStatic("safeBrowsingInit", name, url);
+ }
+
+ public static void SafeBrowsingSetToolbarColor(string name, float r, float g, float b) {
+ CheckPlatform();
+ plugin.CallStatic("safeBrowsingSetToolbarColor", name, r, g, b);
+ }
+
+ public static void SafeBrowsingShow(string name) {
+ CheckPlatform();
+ plugin.CallStatic("safeBrowsingShow", name);
+ }
+
+ public static void CheckPlatform() {
+ if (!correctPlatform) {
+ throw new System.InvalidOperationException("Method can only be performed on Android.");
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/Assets/UniWebView/Interface/UniWebViewAndroid.cs.meta b/Assets/UniWebView/Interface/UniWebViewAndroid.cs.meta
new file mode 100644
index 00000000..0066794f
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewAndroid.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5a1d3cecc27d64565835e14b493c935b
+timeCreated: 1490880130
+licenseType: Store
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Interface/UniWebViewAndroidStaticListener.cs b/Assets/UniWebView/Interface/UniWebViewAndroidStaticListener.cs
new file mode 100644
index 00000000..39c7751a
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewAndroidStaticListener.cs
@@ -0,0 +1,39 @@
+
+// #if UNITY_ANDROID && !UNITY_EDITOR
+using System;
+using System.Reflection;
+using UnityEngine;
+
+public class UniWebViewAndroidStaticListener: MonoBehaviour {
+ void Awake() {
+ DontDestroyOnLoad(gameObject);
+ }
+
+ void OnJavaMessage(string message) {
+ // {listener_name}@{method_name}@parameters
+ string[] parts = message.Split("@"[0]);
+ if (parts.Length < 3) {
+ Debug.Log("Not enough parts for receiving a message.");
+ return;
+ }
+
+ var listener = UniWebViewNativeListener.GetListener(parts[0]);
+ if (listener == null) {
+ return;
+ }
+
+ MethodInfo methodInfo = typeof(UniWebViewNativeListener).GetMethod(parts[1]);
+ if (methodInfo == null) {
+ Debug.Log("Cannot find correct method to invoke: " + parts[1]);
+ }
+
+ var leftLength = parts.Length - 2;
+ var left = new string[leftLength];
+ for (int i = 0; i < leftLength; i++) {
+ left[i] = parts[i + 2];
+ }
+ methodInfo.Invoke(listener, new object[] { String.Join("@", left) });
+ }
+}
+
+// #endif
\ No newline at end of file
diff --git a/Assets/UniWebView/Interface/UniWebViewAndroidStaticListener.cs.meta b/Assets/UniWebView/Interface/UniWebViewAndroidStaticListener.cs.meta
new file mode 100644
index 00000000..407b0f93
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewAndroidStaticListener.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 2704cf8e127d541f1888d96429308645
+timeCreated: 1514387178
+licenseType: Store
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Interface/UniWebViewCocoa.cs b/Assets/UniWebView/Interface/UniWebViewCocoa.cs
new file mode 100644
index 00000000..065a0f20
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewCocoa.cs
@@ -0,0 +1,687 @@
+//
+// UniWebViewInterface.cs
+// Created by Wang Wei(@onevcat) on 2017-04-11.
+//
+// This file is a part of UniWebView Project (https://uniwebview.com)
+// By purchasing the asset, you are allowed to use this code in as many as projects
+// you want, only if you publish the final products under the name of the same account
+// used for the purchase.
+//
+// This asset and all corresponding files (such as source code) are provided on an
+// “as is” basis, without warranty of any kind, express of implied, including but not
+// limited to the warranties of merchantability, fitness for a particular purpose, and
+// noninfringement. In no event shall the authors or copyright holders be liable for any
+// claim, damages or other liability, whether in action of contract, tort or otherwise,
+// arising from, out of or in connection with the software or the use of other dealing in the software.
+//
+#if (UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_IOS) && !UNITY_EDITOR_WIN && !UNITY_EDITOR_LINUX
+
+using UnityEngine;
+using System;
+using System.Runtime.InteropServices;
+using AOT;
+using System.Reflection;
+
+public class UniWebViewInterface {
+ static UniWebViewInterface() {
+ ConnectMessageSender();
+ }
+
+ delegate void UnitySendMessageDelegate(IntPtr objectName, IntPtr methodName, IntPtr parameter);
+
+ private const string DllLib =
+ #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
+ "UniWebView";
+ #else
+ "__Internal";
+ #endif
+
+ private static bool correctPlatform =
+ #if UNITY_EDITOR_OSX
+ Application.platform == RuntimePlatform.OSXEditor ||
+ Application.platform == RuntimePlatform.IPhonePlayer || // Support for Device Simulator package
+ Application.platform == RuntimePlatform.Android; // Support for Device Simulator package
+ #elif UNITY_STANDALONE_OSX
+ Application.platform == RuntimePlatform.OSXPlayer;
+ #else
+ Application.platform == RuntimePlatform.IPhonePlayer;
+ #endif
+
+ [DllImport(DllLib)]
+ private static extern void uv_connectMessageSender(
+ [MarshalAs(UnmanagedType.FunctionPtr)] UnitySendMessageDelegate sendMessageDelegate
+ );
+ static void ConnectMessageSender() {
+ UniWebViewLogger.Instance.Info("Connecting to native side message sender.");
+ CheckPlatform();
+ uv_connectMessageSender(SendMessage);
+ }
+
+ [MonoPInvokeCallback(typeof(UnitySendMessageDelegate))]
+ private static void SendMessage(IntPtr namePtr, IntPtr methodPtr, IntPtr parameterPtr) {
+ string name = Marshal.PtrToStringAuto(namePtr);
+ string method = Marshal.PtrToStringAuto(methodPtr);
+ string parameters = Marshal.PtrToStringAuto(parameterPtr);
+
+ UniWebViewLogger.Instance.Verbose(
+ "Received message sent from native. Name: " + name + " Method: " + method + " Params: " + parameters
+ );
+
+ var listener = UniWebViewNativeListener.GetListener(name);
+ if (listener) {
+ MethodInfo methodInfo = typeof(UniWebViewNativeListener).GetMethod(method);
+ if (methodInfo != null) {
+ methodInfo.Invoke(listener, new object[] { parameters });
+ }
+ }
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setLogLevel(int level);
+ public static void SetLogLevel(int level) {
+ CheckPlatform();
+ uv_setLogLevel(level);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_init(string name, int x, int y, int width, int height);
+ public static void Init(string name, int x, int y, int width, int height) {
+ CheckPlatform();
+ if (String.IsNullOrEmpty(name)) {
+ return;
+ }
+ uv_init(name, x, y, width, height);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_destroy(string name);
+ public static void Destroy(string name) {
+ CheckPlatform();
+ uv_destroy(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_load(string name, string url, bool skipEncoding, string readAccessURL);
+ public static void Load(string name, string url, bool skipEncoding, string readAccessURL) {
+ CheckPlatform();
+ uv_load(name, url, skipEncoding, readAccessURL);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_loadHTMLString(string name, string html, string baseUrl, bool skipEncoding);
+ public static void LoadHTMLString(string name, string html, string baseUrl, bool skipEncoding) {
+ CheckPlatform();
+ uv_loadHTMLString(name, html, baseUrl, skipEncoding);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_reload(string name);
+ public static void Reload(string name) {
+ CheckPlatform();
+ uv_reload(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_stop(string name);
+ public static void Stop(string name) {
+ CheckPlatform();
+ uv_stop(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern string uv_getUrl(string name);
+ public static string GetUrl(string name) {
+ CheckPlatform();
+ return uv_getUrl(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setFrame(string name, int x, int y, int width, int height);
+ public static void SetFrame(string name, int x, int y, int width, int height) {
+ CheckPlatform();
+ uv_setFrame(name, x, y, width, height);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setPosition(string name, int x, int y);
+ public static void SetPosition(string name, int x, int y) {
+ CheckPlatform();
+ uv_setPosition(name, x, y);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setSize(string name, int width, int height);
+ public static void SetSize(string name, int width, int height) {
+ CheckPlatform();
+ uv_setSize(name, width, height);
+ }
+
+ [DllImport(DllLib)]
+ private static extern bool uv_show(string name, bool fade, int edge, float duration, string identifier);
+ public static bool Show(string name, bool fade, int edge, float duration, bool useAsync, string identifier) {
+ CheckPlatform();
+ return uv_show(name, fade, edge, duration, identifier);
+ }
+
+ [DllImport(DllLib)]
+ private static extern bool uv_hide(string name, bool fade, int edge, float duration, string identifier);
+ public static bool Hide(string name, bool fade, int edge, float duration, bool useAsync, string identifier) {
+ CheckPlatform();
+ return uv_hide(name, fade, edge, duration, identifier);
+ }
+
+ [DllImport(DllLib)]
+ private static extern bool uv_animateTo(
+ string name, int x, int y, int width, int height, float duration, float delay, string identifier
+ );
+ public static bool AnimateTo(
+ string name, int x, int y, int width, int height, float duration, float delay, string identifier)
+ {
+ CheckPlatform();
+ return uv_animateTo(name, x, y, width, height, duration, delay, identifier);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_addJavaScript(string name, string jsString, string identifier);
+ public static void AddJavaScript(string name, string jsString, string identifier) {
+ CheckPlatform();
+ uv_addJavaScript(name, jsString, identifier);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_evaluateJavaScript(string name, string jsString, string identifier);
+ public static void EvaluateJavaScript(string name, string jsString, string identifier) {
+ CheckPlatform();
+ uv_evaluateJavaScript(name, jsString, identifier);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_addUrlScheme(string name, string scheme);
+ public static void AddUrlScheme(string name, string scheme) {
+ CheckPlatform();
+ uv_addUrlScheme(name, scheme);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_removeUrlScheme(string name, string scheme);
+ public static void RemoveUrlScheme(string name, string scheme) {
+ CheckPlatform();
+ uv_removeUrlScheme(name, scheme);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_addSslExceptionDomain(string name, string domain);
+ public static void AddSslExceptionDomain(string name, string domain) {
+ CheckPlatform();
+ uv_addSslExceptionDomain(name, domain);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_removeSslExceptionDomain(string name, string domain);
+ public static void RemoveSslExceptionDomain(string name, string domain) {
+ CheckPlatform();
+ uv_removeSslExceptionDomain(name, domain);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setHeaderField(string name, string key, string value);
+ public static void SetHeaderField(string name, string key, string value) {
+ CheckPlatform();
+ uv_setHeaderField(name, key, value);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setUserAgent(string name, string userAgent);
+ public static void SetUserAgent(string name, string userAgent) {
+ CheckPlatform();
+ uv_setUserAgent(name, userAgent);
+ }
+
+ [DllImport(DllLib)]
+ private static extern string uv_getUserAgent(string name);
+ public static string GetUserAgent(string name) {
+ CheckPlatform();
+ return uv_getUserAgent(name);
+ }
+
+
+ [DllImport(DllLib)]
+ private static extern void uv_setContentInsetAdjustmentBehavior(string name, int behavior);
+ public static void SetContentInsetAdjustmentBehavior(
+ string name, UniWebViewContentInsetAdjustmentBehavior behavior
+ )
+ {
+ CheckPlatform();
+ uv_setContentInsetAdjustmentBehavior(name, (int)behavior);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowAutoPlay(bool flag);
+ public static void SetAllowAutoPlay(bool flag) {
+ CheckPlatform();
+ uv_setAllowAutoPlay(flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowInlinePlay(bool flag);
+ public static void SetAllowInlinePlay(bool flag) {
+ CheckPlatform();
+ uv_setAllowInlinePlay(flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowFileAccess(string name, bool flag);
+ public static void SetAllowFileAccess(string name, bool flag) {
+ CheckPlatform();
+ uv_setAllowFileAccess(name, flag);
+ }
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowFileAccessFromFileURLs(string name, bool flag);
+ public static void SetAllowFileAccessFromFileURLs(string name, bool flag) {
+ CheckPlatform();
+ uv_setAllowFileAccessFromFileURLs(name, flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowUniversalAccessFromFileURLs(bool flag);
+ public static void SetAllowUniversalAccessFromFileURLs(bool flag) {
+ CheckPlatform();
+ uv_setAllowUniversalAccessFromFileURLs(flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowJavaScriptOpenWindow(bool flag);
+ public static void SetAllowJavaScriptOpenWindow(bool flag) {
+ CheckPlatform();
+ uv_setAllowJavaScriptOpenWindow(flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setJavaScriptEnabled(bool flag);
+ public static void SetJavaScriptEnabled(bool flag) {
+ CheckPlatform();
+ uv_setJavaScriptEnabled(flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_cleanCache(string name);
+ public static void CleanCache(string name) {
+ CheckPlatform();
+ uv_cleanCache(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_clearCookies();
+ public static void ClearCookies() {
+ CheckPlatform();
+ uv_clearCookies();
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setCookie(string url, string cookie, bool skipEncoding);
+ public static void SetCookie(string url, string cookie, bool skipEncoding) {
+ CheckPlatform();
+ uv_setCookie(url, cookie, skipEncoding);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_removeCookies(string url, bool skipEncoding);
+ public static void RemoveCookies(string url, bool skipEncoding) {
+ CheckPlatform();
+ uv_removeCookies(url, skipEncoding);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_removeCookie(string url, string key, bool skipEncoding);
+ public static void RemoveCookie(string url, string key, bool skipEncoding) {
+ CheckPlatform();
+ uv_removeCookie(url, key, skipEncoding);
+ }
+
+ [DllImport(DllLib)]
+ private static extern string uv_getCookie(string url, string key, bool skipEncoding);
+ public static string GetCookie(string url, string key, bool skipEncoding) {
+ CheckPlatform();
+ return uv_getCookie(url, key, skipEncoding);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_clearHttpAuthUsernamePasswordHost(string host, string realm);
+ public static void ClearHttpAuthUsernamePassword(string host, string realm) {
+ CheckPlatform();
+ uv_clearHttpAuthUsernamePasswordHost(host, realm);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setBackgroundColor(string name, float r, float g, float b, float a);
+ public static void SetBackgroundColor(string name, float r, float g, float b, float a) {
+ CheckPlatform();
+ uv_setBackgroundColor(name, r, g, b, a);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setWebViewAlpha(string name, float alpha);
+ public static void SetWebViewAlpha(string name, float alpha) {
+ CheckPlatform();
+ uv_setWebViewAlpha(name, alpha);
+ }
+
+ [DllImport(DllLib)]
+ private static extern float uv_getWebViewAlpha(string name);
+ public static float GetWebViewAlpha(string name) {
+ CheckPlatform();
+ return uv_getWebViewAlpha(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setShowSpinnerWhileLoading(string name, bool show);
+ public static void SetShowSpinnerWhileLoading(string name, bool show) {
+ CheckPlatform();
+ uv_setShowSpinnerWhileLoading(name, show);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setSpinnerText(string name, string text);
+ public static void SetSpinnerText(string name, string text) {
+ CheckPlatform();
+ uv_setSpinnerText(name, text);
+ }
+
+ [DllImport(DllLib)]
+ private static extern bool uv_canGoBack(string name);
+ public static bool CanGoBack(string name) {
+ CheckPlatform();
+ return uv_canGoBack(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern bool uv_canGoForward(string name);
+ public static bool CanGoForward(string name) {
+ CheckPlatform();
+ return uv_canGoForward(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_goBack(string name);
+ public static void GoBack(string name) {
+ CheckPlatform();
+ uv_goBack(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_goForward(string name);
+ public static void GoForward(string name) {
+ CheckPlatform();
+ uv_goForward(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setOpenLinksInExternalBrowser(string name, bool flag);
+ public static void SetOpenLinksInExternalBrowser(string name, bool flag) {
+ CheckPlatform();
+ uv_setOpenLinksInExternalBrowser(name, flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setHorizontalScrollBarEnabled(string name, bool enabled);
+ public static void SetHorizontalScrollBarEnabled(string name, bool enabled) {
+ CheckPlatform();
+ uv_setHorizontalScrollBarEnabled(name, enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setVerticalScrollBarEnabled(string name, bool enabled);
+ public static void SetVerticalScrollBarEnabled(string name, bool enabled) {
+ CheckPlatform();
+ uv_setVerticalScrollBarEnabled(name, enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setBouncesEnabled(string name, bool enabled);
+ public static void SetBouncesEnabled(string name, bool enabled) {
+ CheckPlatform();
+ uv_setBouncesEnabled(name, enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setZoomEnabled(string name, bool enabled);
+ public static void SetZoomEnabled(string name, bool enabled) {
+ CheckPlatform();
+ uv_setZoomEnabled(name, enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setShowToolbar(string name, bool show, bool animated, bool onTop, bool adjustInset);
+ public static void SetShowToolbar(string name, bool show, bool animated, bool onTop, bool adjustInset) {
+ CheckPlatform();
+ uv_setShowToolbar(name, show, animated, onTop, adjustInset);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setShowToolbarNavigationButtons(string name, bool show);
+ public static void SetShowToolbarNavigationButtons(string name, bool show) {
+ CheckPlatform();
+ uv_setShowToolbarNavigationButtons(name, show);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setToolbarDoneButtonText(string name, string text);
+ public static void SetToolbarDoneButtonText(string name, string text) {
+ CheckPlatform();
+ uv_setToolbarDoneButtonText(name, text);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setGoBackButtonText(string name, string text);
+ public static void SetToolbarGoBackButtonText(string name, string text) {
+ CheckPlatform();
+ uv_setGoBackButtonText(name, text);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setGoForwardButtonText(string name, string text);
+ public static void SetToolbarGoForwardButtonText(string name, string text) {
+ CheckPlatform();
+ uv_setGoForwardButtonText(name, text);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setWindowUserResizeEnabled(string name, bool enabled);
+ public static void SetWindowUserResizeEnabled(string name, bool enabled) {
+ CheckPlatform();
+ uv_setWindowUserResizeEnabled(name, enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setToolbarTintColor(string name, float r, float g, float b);
+ public static void SetToolbarTintColor(string name, float r, float g, float b) {
+ CheckPlatform();
+ uv_setToolbarTintColor(name, r, g, b);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setToolbarTextColor(string name, float r, float g, float b);
+ public static void SetToolbarTextColor(string name, float r, float g, float b) {
+ CheckPlatform();
+ uv_setToolbarTextColor(name, r, g, b);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setUserInteractionEnabled(string name, bool enabled);
+ public static void SetUserInteractionEnabled(string name, bool enabled) {
+ CheckPlatform();
+ uv_setUserInteractionEnabled(name, enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setTransparencyClickingThroughEnabled(string name, bool enabled);
+ public static void SetTransparencyClickingThroughEnabled(string name, bool enabled) {
+ CheckPlatform();
+ uv_setTransparencyClickingThroughEnabled(name, enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setWebContentsDebuggingEnabled(bool enabled);
+ public static void SetWebContentsDebuggingEnabled(bool enabled) {
+ CheckPlatform();
+ uv_setWebContentsDebuggingEnabled(enabled);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowBackForwardNavigationGestures(string name, bool flag);
+ public static void SetAllowBackForwardNavigationGestures(string name, bool flag) {
+ CheckPlatform();
+ uv_setAllowBackForwardNavigationGestures(name, flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowHTTPAuthPopUpWindow(string name, bool flag);
+ public static void SetAllowHTTPAuthPopUpWindow(string name, bool flag) {
+ CheckPlatform();
+ uv_setAllowHTTPAuthPopUpWindow(name, flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_print(string name);
+ public static void Print(string name) {
+ CheckPlatform();
+ uv_print(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_captureSnapshot(string name, string fileName);
+ public static void CaptureSnapshot(string name, string fileName) {
+ CheckPlatform();
+ uv_captureSnapshot(name, fileName);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_scrollTo(string name, int x, int y, bool animated);
+ public static void ScrollTo(string name, int x, int y, bool animated) {
+ CheckPlatform();
+ uv_scrollTo(name, x, y, animated);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setCalloutEnabled(string name, bool flag);
+ public static void SetCalloutEnabled(string name, bool flag) {
+ CheckPlatform();
+ uv_setCalloutEnabled(name, flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setSupportMultipleWindows(string name, bool flag);
+ public static void SetSupportMultipleWindows(string name, bool flag) {
+ CheckPlatform();
+ uv_setSupportMultipleWindows(name, flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setDragInteractionEnabled(string name, bool flag);
+ public static void SetDragInteractionEnabled(string name, bool flag) {
+ CheckPlatform();
+ uv_setDragInteractionEnabled(name, flag);
+ }
+
+ [DllImport(DllLib)]
+ private static extern float uv_nativeScreenWidth();
+ public static float NativeScreenWidth() {
+ #if UNITY_EDITOR_OSX
+ return Screen.width;
+ #else
+ return uv_nativeScreenWidth();
+ #endif
+ }
+
+ [DllImport(DllLib)]
+ private static extern float uv_nativeScreenHeight();
+ public static float NativeScreenHeight() {
+ #if UNITY_EDITOR_OSX
+ return Screen.height;
+ #else
+ return uv_nativeScreenHeight();
+ #endif
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_addDownloadURL(string name, string urlString, int type);
+ public static void AddDownloadURL(string name, string urlString, int type) {
+ CheckPlatform();
+ uv_addDownloadURL(name, urlString, type);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_removeDownloadURL(string name, string urlString, int type);
+ public static void RemoveDownloadURL(string name, string urlString, int type) {
+ CheckPlatform();
+ uv_removeDownloadURL(name, urlString, type);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_addDownloadMIMEType(string name, string MIMEType, int type);
+ public static void AddDownloadMIMEType(string name, string MIMEType, int type) {
+ CheckPlatform();
+ uv_addDownloadMIMEType(name, MIMEType, type);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_removeDownloadMIMETypes(string name, string MIMEType, int type);
+ public static void RemoveDownloadMIMETypes(string name, string MIMEType, int type) {
+ CheckPlatform();
+ uv_removeDownloadMIMETypes(name, MIMEType, type);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_setAllowUserChooseActionAfterDownloading(string name, bool allowed);
+ public static void SetAllowUserChooseActionAfterDownloading(string name, bool allowed) {
+ CheckPlatform();
+ uv_setAllowUserChooseActionAfterDownloading(name, allowed);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_safeBrowsingInit(string name, string url);
+ public static void SafeBrowsingInit(string name, string url) {
+ CheckPlatform();
+ if (String.IsNullOrEmpty(name)) {
+ return;
+ }
+ uv_safeBrowsingInit(name, url);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_safeBrowsingShow(string name);
+ public static void SafeBrowsingShow(string name) {
+ CheckPlatform();
+ uv_safeBrowsingShow(name);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_safeBrowsingSetToolbarColor(string name, float r, float g, float b);
+ public static void SafeBrowsingSetToolbarColor(string name, float r, float g, float b) {
+ CheckPlatform();
+ uv_safeBrowsingSetToolbarColor(name, r, g, b);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_safeBrowsingSetToolbarItemColor(string name, float r, float g, float b);
+ public static void SafeBrowsingSetToolbarItemColor(string name, float r, float g, float b) {
+ CheckPlatform();
+ uv_safeBrowsingSetToolbarItemColor(name, r, g, b);
+ }
+
+ [DllImport(DllLib)]
+ private static extern void uv_safeBrowsingDismiss(string name);
+ public static void SafeBrowsingDismiss(string name) {
+ CheckPlatform();
+ uv_safeBrowsingDismiss(name);
+ }
+
+ public static void CheckPlatform() {
+ if (!correctPlatform) {
+ throw new System.InvalidOperationException(
+ "Method can only be performed on correct platform. Current: " + Application.platform
+ );
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/Assets/UniWebView/Interface/UniWebViewCocoa.cs.meta b/Assets/UniWebView/Interface/UniWebViewCocoa.cs.meta
new file mode 100644
index 00000000..af02b388
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewCocoa.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2e905ba0b47304f4cbf9e3e3345f84eb
+timeCreated: 1492400358
+licenseType: Store
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Interface/UniWebViewPlaceholder.cs b/Assets/UniWebView/Interface/UniWebViewPlaceholder.cs
new file mode 100644
index 00000000..567e3fbd
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewPlaceholder.cs
@@ -0,0 +1,89 @@
+#if UNITY_EDITOR_WIN || UNITY_EDITOR_LINUX || (!UNITY_EDITOR_OSX && !UNITY_STANDALONE_OSX && !UNITY_IOS && !UNITY_ANDROID)
+
+using UnityEngine;
+
+public class UniWebViewInterface {
+
+ private static bool alreadyLoggedWarning = false;
+
+ public static void SetLogLevel(int level) { CheckPlatform(); }
+ public static void Init(string name, int x, int y, int width, int height) { CheckPlatform(); }
+ public static void Destroy(string name) { CheckPlatform(); }
+ public static void Load(string name, string url, bool skipEncoding, string readAccessURL) { CheckPlatform(); }
+ public static void LoadHTMLString(string name, string html, string baseUrl, bool skipEncoding) { CheckPlatform(); }
+ public static void Reload(string name) { CheckPlatform(); }
+ public static void Stop(string name) { CheckPlatform(); }
+ public static string GetUrl(string name) { CheckPlatform(); return ""; }
+ public static void SetFrame(string name, int x, int y, int width, int height) { CheckPlatform(); }
+ public static void SetPosition(string name, int x, int y) { CheckPlatform(); }
+ public static void SetSize(string name, int width, int height) { CheckPlatform(); }
+ public static bool Show(string name, bool fade, int edge, float duration, bool useAsync, string identifier) { CheckPlatform(); return false; }
+ public static bool Hide(string name, bool fade, int edge, float duration, bool useAsync, string identifier) { CheckPlatform(); return false; }
+ public static bool AnimateTo(string name, int x, int y, int width, int height, float duration, float delay, string identifier) { CheckPlatform(); return false; }
+ public static void AddJavaScript(string name, string jsString, string identifier) { CheckPlatform(); }
+ public static void EvaluateJavaScript(string name, string jsString, string identifier) { CheckPlatform(); }
+ public static void AddUrlScheme(string name, string scheme) { CheckPlatform(); }
+ public static void RemoveUrlScheme(string name, string scheme) { CheckPlatform(); }
+ public static void AddSslExceptionDomain(string name, string domain) { CheckPlatform(); }
+ public static void RemoveSslExceptionDomain(string name, string domain) { CheckPlatform(); }
+ public static void SetHeaderField(string name, string key, string value) { CheckPlatform(); }
+ public static void SetUserAgent(string name, string userAgent) { CheckPlatform(); }
+ public static string GetUserAgent(string name) { CheckPlatform(); return ""; }
+ public static void SetAllowAutoPlay(bool flag) { CheckPlatform(); }
+ public static void SetAllowInlinePlay(bool flag) { CheckPlatform(); }
+ public static void SetAllowJavaScriptOpenWindow(bool flag) { CheckPlatform(); }
+ public static void SetAllowFileAccess(string name, bool flag) { CheckPlatform(); }
+ public static void SetAllowFileAccessFromFileURLs(string name, bool flag) { CheckPlatform(); }
+ public static void SetAllowUniversalAccessFromFileURLs(bool flag) { CheckPlatform(); }
+ public static void SetJavaScriptEnabled(bool flag) { CheckPlatform(); }
+ public static void CleanCache(string name) { CheckPlatform(); }
+ public static void ClearCookies() { CheckPlatform(); }
+ public static void SetCookie(string url, string cookie, bool skipEncoding) { CheckPlatform(); }
+ public static void RemoveCookies(string url, bool skipEncoding) { CheckPlatform(); }
+ public static void RemoveCookie(string url, string key, bool skipEncoding) { CheckPlatform(); }
+ public static string GetCookie(string url, string key, bool skipEncoding) { CheckPlatform(); return ""; }
+ public static void ClearHttpAuthUsernamePassword(string host, string realm) { CheckPlatform(); }
+ public static void SetBackgroundColor(string name, float r, float g, float b, float a) { CheckPlatform(); }
+ public static void SetWebViewAlpha(string name, float alpha) { CheckPlatform(); }
+ public static float GetWebViewAlpha(string name) { CheckPlatform(); return 0.0f; }
+ public static void SetShowSpinnerWhileLoading(string name, bool show) { CheckPlatform(); }
+ public static void SetSpinnerText(string name, string text) { CheckPlatform(); }
+ public static bool CanGoBack(string name) { CheckPlatform(); return false; }
+ public static bool CanGoForward(string name) { CheckPlatform(); return false; }
+ public static void GoBack(string name) { CheckPlatform(); }
+ public static void GoForward(string name) { CheckPlatform(); }
+ public static void SetOpenLinksInExternalBrowser(string name, bool flag) { CheckPlatform(); }
+ public static void SetHorizontalScrollBarEnabled(string name, bool enabled) { CheckPlatform(); }
+ public static void SetVerticalScrollBarEnabled(string name, bool enabled) { CheckPlatform(); }
+ public static void SetBouncesEnabled(string name, bool enabled) { CheckPlatform(); }
+ public static void SetZoomEnabled(string name, bool enabled) { CheckPlatform(); }
+ public static void SetShowToolbar(string name, bool show, bool animated, bool onTop, bool adjustInset) { CheckPlatform(); }
+ public static void SetToolbarDoneButtonText(string name, string text) { CheckPlatform(); }
+ public static void SetToolbarGoBackButtonText(string name, string text) { CheckPlatform(); }
+ public static void SetToolbarGoForwardButtonText(string name, string text) { CheckPlatform(); }
+ public static void SetToolbarTintColor(string name, float r, float g, float b) { CheckPlatform(); }
+ public static void SetToolbarTextColor(string name, float r, float g, float b) { CheckPlatform(); }
+ public static void SetUserInteractionEnabled(string name, bool enabled) { CheckPlatform(); }
+ public static void SetTransparencyClickingThroughEnabled(string name, bool enabled) { CheckPlatform(); }
+ public static void SetWebContentsDebuggingEnabled(bool enabled) { CheckPlatform(); }
+ public static void SetAllowHTTPAuthPopUpWindow(string name, bool flag) { CheckPlatform(); }
+ public static void Print(string name) { CheckPlatform(); }
+ public static void CaptureSnapshot(string name, string filename) { CheckPlatform(); }
+ public static void SetCalloutEnabled(string name, bool flag) { CheckPlatform(); }
+ public static void SetSupportMultipleWindows(string name, bool flag) { CheckPlatform(); }
+ public static void SetDragInteractionEnabled(string name, bool flag) { CheckPlatform(); }
+ public static void ScrollTo(string name, int x, int y, bool animated) { CheckPlatform(); }
+ public static float NativeScreenWidth() { CheckPlatform(); return 0.0f; }
+ public static float NativeScreenHeight() { CheckPlatform(); return 0.0f; }
+ public static void SafeBrowsingInit(string name, string url) { CheckPlatform(); }
+ public static void SafeBrowsingSetToolbarColor(string name, float r, float g, float b) { CheckPlatform(); }
+ public static void SafeBrowsingShow(string name) { CheckPlatform(); }
+
+ public static void CheckPlatform() {
+ if (!alreadyLoggedWarning) {
+ alreadyLoggedWarning = true;
+ Debug.LogWarning("UniWebView only supports iOS/Android/macOS Editor. You current platform " + Application.platform + " is not supported.");
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/Assets/UniWebView/Interface/UniWebViewPlaceholder.cs.meta b/Assets/UniWebView/Interface/UniWebViewPlaceholder.cs.meta
new file mode 100644
index 00000000..a99c0465
--- /dev/null
+++ b/Assets/UniWebView/Interface/UniWebViewPlaceholder.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0b3bad20d12b1433ab8927c3effc605b
+timeCreated: 1497403102
+licenseType: Store
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Prefab.meta b/Assets/UniWebView/Prefab.meta
new file mode 100644
index 00000000..c6b458a0
--- /dev/null
+++ b/Assets/UniWebView/Prefab.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: d5d657f2ee1114e20bccaace74235a99
+folderAsset: yes
+timeCreated: 1491898971
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Prefab/UniWebView.prefab b/Assets/UniWebView/Prefab/UniWebView.prefab
new file mode 100644
index 00000000..98afb506
--- /dev/null
+++ b/Assets/UniWebView/Prefab/UniWebView.prefab
@@ -0,0 +1,57 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &1900085666445226
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 4960404783511462}
+ - component: {fileID: 114939446366399424}
+ m_Layer: 0
+ m_Name: UniWebView
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &4960404783511462
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1900085666445226}
+ 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_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &114939446366399424
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 1900085666445226}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 598e18fb001004a81960f552978ecf4e, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ urlOnStart:
+ showOnStart: 1
+ fullScreen: 1
+ useToolbar: 1
+ toolbarPosition: 0
+ frame:
+ serializedVersion: 2
+ x: 0
+ y: 0
+ width: 0
+ height: 0
+ referenceRectTransform: {fileID: 0}
diff --git a/Assets/UniWebView/Prefab/UniWebView.prefab.meta b/Assets/UniWebView/Prefab/UniWebView.prefab.meta
new file mode 100644
index 00000000..063115af
--- /dev/null
+++ b/Assets/UniWebView/Prefab/UniWebView.prefab.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 7e3f16a6f6303419cbd9837f6c746de4
+timeCreated: 1496204510
+licenseType: Store
+NativeFormatImporter:
+ mainObjectFileID: 100100000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Prefab/UniWebViewSafeBrowsing.prefab b/Assets/UniWebView/Prefab/UniWebViewSafeBrowsing.prefab
new file mode 100644
index 00000000..08e434fd
--- /dev/null
+++ b/Assets/UniWebView/Prefab/UniWebViewSafeBrowsing.prefab
@@ -0,0 +1,46 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &8236771505572270655
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 8236771505572270653}
+ - component: {fileID: 8236771505572270654}
+ m_Layer: 0
+ m_Name: UniWebViewSafeBrowsing
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &8236771505572270653
+Transform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8236771505572270655}
+ 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_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &8236771505572270654
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8236771505572270655}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 5843488507315421aa0a7d92c0604d10, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ url:
diff --git a/Assets/UniWebView/Prefab/UniWebViewSafeBrowsing.prefab.meta b/Assets/UniWebView/Prefab/UniWebViewSafeBrowsing.prefab.meta
new file mode 100644
index 00000000..145400e7
--- /dev/null
+++ b/Assets/UniWebView/Prefab/UniWebViewSafeBrowsing.prefab.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 2d6c4899a63004f16bb4f791176f4ad3
+PrefabImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/README.txt b/Assets/UniWebView/README.txt
new file mode 100644
index 00000000..09281fb5
--- /dev/null
+++ b/Assets/UniWebView/README.txt
@@ -0,0 +1,30 @@
+# UniWebView
+
+Thank you for purchasing UniWebView.
+
+UniWebView is a Unity3D plugin built on native iOS/Android technology. It helps your users to enjoy web content and
+interact with your game through the web views.
+
+## Documentation
+
+To get started, please visit our documentation site: [https://docs.uniwebview.com](https://docs.uniwebview.com). You
+could find step-by-step guides on how to import UniWebView to your project, as well as some basic usage of this asset.
+You could also find a full script reference on the same site in this page: [https://docs.uniwebview.com/api/](https://docs.uniwebview.com/api/).
+
+## Upgrading
+
+All purchased customers could get all updates for the same major version for free. Please check the place you have
+purchased this asset to see whether there is an update or not. A release note is also contained in this asset, in the
+"CHANGELOG.md" file. You could also find the same version list in [this page](https://docs.uniwebview.com/release-note).
+
+## Getting Support
+
+For frequently asked questions, we have a page to answer them. If you encountered any problems while using UniWebView,
+we strongly suggest to visit the [FAQ page](https://docs.uniwebview.com/guide/faq.html) first. Also feel free to
+[submit a ticket](https://onevcat.atlassian.net/servicedesk/customer/portal/2) if you cannot find a solution, we will
+do our best to get you out!
+
+## Other
+
+For more information, please visit the [official web site](https://uniwebview.com) of UniWebView, or contact us through
+a ticket.
diff --git a/Assets/UniWebView/README.txt.meta b/Assets/UniWebView/README.txt.meta
new file mode 100644
index 00000000..b30fbfcc
--- /dev/null
+++ b/Assets/UniWebView/README.txt.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 95440ce70c5e14d6e96e166c45f7cf6d
+timeCreated: 1499302025
+licenseType: Store
+TextScriptImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Script.meta b/Assets/UniWebView/Script.meta
new file mode 100644
index 00000000..c78c9fe8
--- /dev/null
+++ b/Assets/UniWebView/Script.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: b34f36f9836464e04893f632434d0862
+folderAsset: yes
+timeCreated: 1491898971
+licenseType: Store
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/UniWebView/Script/UniWebView.cs b/Assets/UniWebView/Script/UniWebView.cs
new file mode 100644
index 00000000..6763d5ea
--- /dev/null
+++ b/Assets/UniWebView/Script/UniWebView.cs
@@ -0,0 +1,1739 @@
+//
+// UniWebView.cs
+// Created by Wang Wei (@onevcat) on 2017-04-11.
+//
+// This file is a part of UniWebView Project (https://uniwebview.com)
+// By purchasing the asset, you are allowed to use this code in as many as projects
+// you want, only if you publish the final products under the name of the same account
+// used for the purchase.
+//
+// This asset and all corresponding files (such as source code) are provided on an
+// “as is” basis, without warranty of any kind, express of implied, including but not
+// limited to the warranties of merchantability, fitness for a particular purpose, and
+// noninfringement. In no event shall the authors or copyright holders be liable for any
+// claim, damages or other liability, whether in action of contract, tort or otherwise,
+// arising from, out of or in connection with the software or the use of other dealing in the software.
+//
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+///
+/// Main class of UniWebView. Any `GameObject` instance with this script can represent a webview object in the scene.
+/// Use this class to create, load, show and interact with a general-purpose web view.
+///
+public class UniWebView: MonoBehaviour {
+ ///
+ /// Delegate for page started event.
+ ///
+ /// The web view component which raises this event.
+ /// The url which the web view is about to load.
+ public delegate void PageStartedDelegate(UniWebView webView, string url);
+
+ ///
+ /// Raised when the web view starts loading a url.
+ ///
+ /// This event will be invoked for both url loading with `Load` method or by a link navigating from page.
+ ///
+ public event PageStartedDelegate OnPageStarted;
+
+ ///
+ /// Delegate for page finished event.
+ ///
+ /// The web view component which raises this event.
+ /// HTTP status code received from response.
+ /// The url which the web view loaded.
+ public delegate void PageFinishedDelegate(UniWebView webView, int statusCode, string url);
+ ///
+ /// Raised when the web view finished to load a url successfully.
+ ///
+ /// This method will be invoked when a valid response received from the url, regardless of the response status.
+ /// If a url loading fails before reaching to the server and getting a response, `OnPageErrorReceived` will be
+ /// raised instead.
+ ///
+ public event PageFinishedDelegate OnPageFinished;
+
+ ///
+ /// Delegate for page error received event.
+ ///
+ /// The web view component which raises this event.
+ ///
+ /// The error code which indicates the error type.
+ /// It can be different from systems and platforms.
+ ///
+ /// The error message which indicates the error.
+ public delegate void PageErrorReceivedDelegate(UniWebView webView, int errorCode, string errorMessage);
+ ///
+ /// Raised when an error encountered during the loading process.
+ /// Such as the "host not found" error or "no Internet connection" error will raise this event.
+ ///
+ public event PageErrorReceivedDelegate OnPageErrorReceived;
+
+ ///
+ /// Delegate for page progress changed event.
+ ///
+ /// The web view component which raises this event.
+ /// A value indicates the loading progress of current page. It is a value between 0.0f and 1.0f.
+ public delegate void PageProgressChangedDelegate(UniWebView webView, float progress);
+ ///
+ /// Raised when the loading progress value changes in current web view.
+ ///
+ public event PageProgressChangedDelegate OnPageProgressChanged;
+
+ ///
+ /// Delegate for message received event.
+ ///
+ /// The web view component which raises this event.
+ /// Message received from web view.
+ public delegate void MessageReceivedDelegate(UniWebView webView, UniWebViewMessage message);
+ ///
+ /// Raised when a message from web view is received.
+ ///
+ /// Generally, the message comes from a navigation to
+ /// a scheme which is observed by current web view. You could use `AddUrlScheme` and
+ /// `RemoveUrlScheme` to manipulate the scheme list.
+ ///
+ /// "uniwebview://" scheme is default in the list, so a clicking on link starting with "uniwebview://"
+ /// will raise this event, if it is not removed.
+ ///
+ public event MessageReceivedDelegate OnMessageReceived;
+
+ ///
+ /// Delegate for should close event.
+ ///
+ /// The web view component which raises this event.
+ /// Whether the web view should be closed and destroyed.
+ public delegate bool ShouldCloseDelegate(UniWebView webView);
+ ///
+ /// Raised when the web view is about to close itself.
+ ///
+ /// This event is raised when the users close the web view by Back button on Android, Done button on iOS,
+ /// or Close button on Unity Editor. It gives a chance to make final decision whether the web view should
+ /// be closed and destroyed. You can also clean all related resources you created (such as a reference to
+ /// the web view) in this event.
+ ///
+ public event ShouldCloseDelegate OnShouldClose;
+
+ ///
+ /// Delegate for orientation changed event.
+ ///
+ /// The web view component which raises this event.
+ /// The screen orientation for current state.
+ public delegate void OrientationChangedDelegate(UniWebView webView, ScreenOrientation orientation);
+ ///
+ /// Raised when the screen orientation is changed. It is a good time to set the web view frame if you
+ /// need to support multiple orientations in your game.
+ ///
+ public event OrientationChangedDelegate OnOrientationChanged;
+
+ ///
+ /// Delegate for content loading terminated event.
+ ///
+ /// The web view component which raises this event.
+ public delegate void OnWebContentProcessTerminatedDelegate(UniWebView webView);
+ ///
+ /// Raised when on iOS, when system calls `webViewWebContentProcessDidTerminate` method.
+ /// It is usually due to a low memory when loading the web content and leave you a blank white screen.
+ /// You need to free as much as memory you could and then do a page reload.
+ ///
+ public event OnWebContentProcessTerminatedDelegate OnWebContentProcessTerminated;
+
+ ///
+ /// Delegate for file download task starting event.
+ ///
+ /// The web view component which raises this event.
+ /// The remote URL of this download task. This is also the download URL for the task.
+ /// The file name which user chooses to use.
+ public delegate void FileDownloadStarted(UniWebView webView, string remoteUrl, string fileName);
+ ///
+ /// Raised when a file download task starts.
+ ///
+ public event FileDownloadStarted OnFileDownloadStarted;
+
+ ///
+ /// Delegate for file download task finishing event.
+ ///
+ /// The web view component which raises this event.
+ ///
+ /// The error code of the download task result. Value `0` means the download finishes without a problem.
+ /// Any other non-`0` value indicates an issue. The detail meaning of the error code depends on system.
+ /// On iOS, it is usually the `errorCode` of the received `NSURLError`. On Android, the value usually represents
+ /// an `ERROR_*` value in `DownloadManager`.
+ ///
+ /// The remote URL of this download task.
+ ///
+ /// The file path of the downloaded file. On iOS, the downloader file is in a temporary folder of your app sandbox.
+ /// On Android, it is in the "Download" folder of your app.
+ ///
+ public delegate void FileDownloadFinished(UniWebView webView, int errorCode, string remoteUrl, string diskPath);
+ ///
+ /// Raised when a file download task finishes with either an error or success.
+ ///
+ public event FileDownloadFinished OnFileDownloadFinished;
+
+ ///
+ /// Delegate for capturing snapshot finished event.
+ ///
+ /// The web view component which raises this event.
+ ///
+ /// The error code of the event. If the snapshot is captured and stored without a problem, the error code is 0.
+ /// Any other number indicates an error happened. In most cases, the screenshot capturing only fails due to lack
+ /// of disk storage.
+ ///
+ ///
+ /// An accessible disk path to the captured snapshot image. If an error happens, it is an empty string.
+ ///
+ public delegate void CaptureSnapshotFinished(UniWebView webView, int errorCode, string diskPath);
+ ///
+ /// Raised when an image captured and stored in a cache path on disk.
+ ///
+ public event CaptureSnapshotFinished OnCaptureSnapshotFinished;
+
+ ///
+ /// Delegate for multiple window opening event.
+ ///
+ /// The web view component which opens the new multiple (pop-up) window.
+ /// The identifier of the opened new window.
+ public delegate void MultipleWindowOpenedDelegate(UniWebView webView, string multipleWindowId);
+ ///
+ /// Raised when a new window is opened. This happens when you enable the `SetSupportMultipleWindows` and open a
+ /// new pop-up window.
+ ///
+ public event MultipleWindowOpenedDelegate OnMultipleWindowOpened;
+
+ ///
+ /// Delegate for multiple window closing event.
+ ///
+ /// The web view component which closes the multiple window.
+ /// The identifier of the closed window.
+ public delegate void MultipleWindowClosedDelegate(UniWebView webView, string multipleWindowId);
+ ///
+ /// Raised when the multiple window is closed. This happens when the pop-up window is closed by navigation operation
+ /// or by a invocation of `close()` on the page.
+ ///
+ public event MultipleWindowClosedDelegate OnMultipleWindowClosed;
+
+ private string id = Guid.NewGuid().ToString();
+ private UniWebViewNativeListener listener;
+
+ private bool isPortrait;
+ [SerializeField]
+
+ #pragma warning disable 0649
+ private string urlOnStart;
+ [SerializeField]
+ private bool showOnStart = false;
+
+ [SerializeField]
+ private bool fullScreen;
+
+ [SerializeField]
+ private bool useToolbar;
+
+
+ [SerializeField]
+ private UniWebViewToolbarPosition toolbarPosition;
+
+ #pragma warning restore 0649
+
+ // Action callback holders
+ private Dictionary actions = new Dictionary();
+ private Dictionary> payloadActions = new Dictionary>();
+
+ [SerializeField]
+ private Rect frame;
+ ///
+ /// Gets or sets the frame of current web view. The value is based on current `Screen.width` and `Screen.height`.
+ /// The first two values of `Rect` is `x` and `y` position and the followed two `width` and `height`.
+ ///
+ public Rect Frame {
+ get { return frame; }
+ set {
+ frame = value;
+ UpdateFrame();
+ }
+ }
+
+ [SerializeField]
+ private RectTransform referenceRectTransform;
+ ///
+ /// A reference rect transform which the web view should change its position and size to.
+ /// Set it to a Unity UI element (which contains a `RectTransform`) under a canvas to determine
+ /// the web view frame by a certain UI element.
+ ///
+ /// By using this, you could get benefit from [Multiple Resolutions UI](https://docs.unity3d.com/Manual/HOWTO-UIMultiResolution.html).
+ ///
+ ///
+ public RectTransform ReferenceRectTransform {
+ get {
+ return referenceRectTransform;
+ }
+ set {
+ referenceRectTransform = value;
+ UpdateFrame();
+ }
+ }
+
+ private bool started;
+
+ private bool backButtonEnabled = true;
+
+ ///
+ /// The url of current loaded web page.
+ ///
+ public string Url {
+ get { return UniWebViewInterface.GetUrl(listener.Name); }
+ }
+
+ ///
+ /// Updates and sets current frame of web view to match the setting.
+ ///
+ /// This is useful if the `referenceRectTransform` is changed and you need to sync the frame change
+ /// to the web view. This method follows the frame determining rules.
+ ///
+ public void UpdateFrame() {
+ Rect rect = NextFrameRect();
+ UniWebViewInterface.SetFrame(listener.Name, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
+ }
+
+ Rect NextFrameRect() {
+ if (referenceRectTransform == null) {
+ UniWebViewLogger.Instance.Info("Using Frame setting to determine web view frame.");
+ return frame;
+ } else {
+ UniWebViewLogger.Instance.Info("Using reference RectTransform to determine web view frame.");
+ var worldCorners = new Vector3[4];
+
+ referenceRectTransform.GetWorldCorners(worldCorners);
+
+ var bottomLeft = worldCorners[0];
+ var topLeft = worldCorners[1];
+ var topRight = worldCorners[2];
+ var bottomRight = worldCorners[3];
+
+ var canvas = referenceRectTransform.GetComponentInParent