diff --git a/dist/package/Assets/Plugins/Android.meta b/dist/package/Assets/Plugins/Android.meta index ab6f3f91..00080667 100644 --- a/dist/package/Assets/Plugins/Android.meta +++ b/dist/package/Assets/Plugins/Android.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bd8aefefe04fd44339fb783d2f6a218a +guid: 30b4a1ca6844d4adbb7c160c875f3dcb folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/Plugins/Android/WebViewPlugin.jar b/dist/package/Assets/Plugins/Android/WebViewPlugin.jar index befd77a3..dbe3ceb3 100644 Binary files a/dist/package/Assets/Plugins/Android/WebViewPlugin.jar and b/dist/package/Assets/Plugins/Android/WebViewPlugin.jar differ diff --git a/dist/package/Assets/Plugins/Android/WebViewPlugin.jar.meta b/dist/package/Assets/Plugins/Android/WebViewPlugin.jar.meta index 28db9e7c..d71a6c86 100644 --- a/dist/package/Assets/Plugins/Android/WebViewPlugin.jar.meta +++ b/dist/package/Assets/Plugins/Android/WebViewPlugin.jar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d3dfc4ba43fd84f68a4974bf3e0be3b7 +guid: d74f01432670c4622ba8f00e6da73107 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/dist/package/Assets/Plugins/Editor.meta b/dist/package/Assets/Plugins/Editor.meta index 0832388d..ca83f3fe 100644 --- a/dist/package/Assets/Plugins/Editor.meta +++ b/dist/package/Assets/Plugins/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c8939e3149adc4bdab48def0d4148c0f +guid: 6ee20e58ba1e045d9984c0d9911d651d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs.meta b/dist/package/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs.meta index 868c928c..080990d5 100644 --- a/dist/package/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs.meta +++ b/dist/package/Assets/Plugins/Editor/UnityWebViewPostprocessBuild.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e5fc8a4c26f7849509d5e6cc3d326459 +guid: 4e582d49d477542adbf732b2391a56ee MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents.meta index 83f3dd86..4f83a684 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 13298d3eb0fcf40d4ba975018bca82f3 +guid: 894ef7508cc8e4af991d20bc53d1ef3e folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist b/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist index fff6e86d..ecfb51dc 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist @@ -29,19 +29,19 @@ DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 12A7403 + 12B45b DTPlatformName macosx DTPlatformVersion - 10.15.6 + 11.0 DTSDKBuild - 19G68 + 20A2408 DTSDKName - macosx10.15 + macosx11.0 DTXcode - 1210 + 1220 DTXcodeBuild - 12A7403 + 12B45b LSMinimumSystemVersion 10.13 diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist.meta index 8b73aab6..14832513 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/Info.plist.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 97637dfde609541738effe364c0ea1ee +guid: ebb37365b6d86437bb7d8e995a6a9b93 DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS.meta index 7401ef8c..99764522 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5a59ca6e4117b4cafbbca4b678847190 +guid: aae37bd8715df4c80aaaf4ff0688b961 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView b/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView index b9203499..3c604d3b 100755 Binary files a/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView and b/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView differ diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView.meta index 244339b5..a0c063d6 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/MacOS/WebView.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0576802e398e34285b34305bd20dcaa2 +guid: 47897c790bd2545e4aaeeefe1a18127a DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources.meta index fcfb6fa9..2281bffe 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e9c1e42c8e60c4ce79151708c7dbfb69 +guid: 2a4c3d35f366a49348fd3468990c0150 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources/InfoPlist.strings.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources/InfoPlist.strings.meta index 26963e69..903a1254 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources/InfoPlist.strings.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/Resources/InfoPlist.strings.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4666e31f02cee4aaa85aacae80ce310d +guid: da2e7779037a84e77b53bd2eb66eeb53 DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature.meta index 30ea19fc..6d8399a2 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7c412834a3eb94b499d5b914bf8abf6f +guid: 7bf7ab876dc854ca6be3ae22ced7891b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature/CodeResources.meta b/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature/CodeResources.meta index 9a9d95e9..22174783 100644 --- a/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature/CodeResources.meta +++ b/dist/package/Assets/Plugins/WebView.bundle/Contents/_CodeSignature/CodeResources.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8414ed900214840b2a8ccd18b3d8303c +guid: 9f3490cbdbdbb4cf89ed3ba1e1cc5c27 DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/Plugins/WebViewObject.cs.meta b/dist/package/Assets/Plugins/WebViewObject.cs.meta index 69f14694..3cc6598a 100644 --- a/dist/package/Assets/Plugins/WebViewObject.cs.meta +++ b/dist/package/Assets/Plugins/WebViewObject.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: af1bfd685d789410c972bb00b5955ec7 +guid: b3fa51b0047834ab3993bd033951127c MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/dist/package/Assets/Plugins/iOS.meta b/dist/package/Assets/Plugins/iOS.meta index 9f261171..71eb2970 100644 --- a/dist/package/Assets/Plugins/iOS.meta +++ b/dist/package/Assets/Plugins/iOS.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ca1c9d902fbee4103bb6077d647d6184 +guid: 19b9f8ee07e9b4def849113e8e758da4 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/Plugins/iOS/WebView.mm b/dist/package/Assets/Plugins/iOS/WebView.mm index 7cc0374a..85053edd 100644 --- a/dist/package/Assets/Plugins/iOS/WebView.mm +++ b/dist/package/Assets/Plugins/iOS/WebView.mm @@ -120,10 +120,6 @@ - (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)tra hookRegex = nil; basicAuthUserName = nil; basicAuthPassword = nil; - if (ua != NULL && strcmp(ua, "") != 0) { - [[NSUserDefaults standardUserDefaults] - registerDefaults:@{ @"UserAgent": [[NSString alloc] initWithUTF8String:ua] }]; - } UIView *view = UnityGetGLViewController().view; if (enableWKWebView && [WKWebView class]) { if (_sharedProcessPool == NULL) { @@ -151,6 +147,9 @@ - (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)tra webView = [[WKWebView alloc] initWithFrame:view.frame configuration:configuration]; webView.UIDelegate = self; webView.navigationDelegate = self; + if (ua != NULL && strcmp(ua, "") != 0) { + ((WKWebView *)webView).customUserAgent = [[NSString alloc] initWithUTF8String:ua]; + } } else { webView = nil; return self; diff --git a/dist/package/Assets/Plugins/iOS/WebView.mm.meta b/dist/package/Assets/Plugins/iOS/WebView.mm.meta index 1f53bdd3..6e1e98ef 100644 --- a/dist/package/Assets/Plugins/iOS/WebView.mm.meta +++ b/dist/package/Assets/Plugins/iOS/WebView.mm.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7905ec602129c499386bd8d055db4123 +guid: d88d974e272824072b64a05b824470f4 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm b/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm index e101f351..ac8791b6 100644 --- a/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm +++ b/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm @@ -164,10 +164,6 @@ - (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)tra hookRegex = nil; basicAuthUserName = nil; basicAuthPassword = nil; - if (ua != NULL && strcmp(ua, "") != 0) { - [[NSUserDefaults standardUserDefaults] - registerDefaults:@{ @"UserAgent": [[NSString alloc] initWithUTF8String:ua] }]; - } UIView *view = UnityGetGLViewController().view; if (enableWKWebView && [WKWebView class]) { if (_sharedProcessPool == NULL) { @@ -195,7 +191,14 @@ - (id)initWithGameObjectName:(const char *)gameObjectName_ transparent:(BOOL)tra webView = [[WKWebView alloc] initWithFrame:view.frame configuration:configuration]; webView.UIDelegate = self; webView.navigationDelegate = self; + if (ua != NULL && strcmp(ua, "") != 0) { + ((WKWebView *)webView).customUserAgent = [[NSString alloc] initWithUTF8String:ua]; + } } else { + if (ua != NULL && strcmp(ua, "") != 0) { + [[NSUserDefaults standardUserDefaults] + registerDefaults:@{ @"UserAgent": [[NSString alloc] initWithUTF8String:ua] }]; + } UIWebView *uiwebview = [[UIWebView alloc] initWithFrame:view.frame]; uiwebview.allowsInlineMediaPlayback = YES; uiwebview.mediaPlaybackRequiresUserAction = NO; diff --git a/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm.meta b/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm.meta index 96a64de0..03a96185 100644 --- a/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm.meta +++ b/dist/package/Assets/Plugins/iOS/WebViewWithUIWebView.mm.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2ae5993de818b4db1afd98ca91d5328a +guid: 818fff10b8b7642c2979ea2678bc6ac7 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/dist/package/Assets/Plugins/unity-webview-webgl-plugin.jslib.meta b/dist/package/Assets/Plugins/unity-webview-webgl-plugin.jslib.meta index 9bd2e071..b39f8d3f 100644 --- a/dist/package/Assets/Plugins/unity-webview-webgl-plugin.jslib.meta +++ b/dist/package/Assets/Plugins/unity-webview-webgl-plugin.jslib.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7326a4a80b4c245d284152891c98ba9d +guid: 73cf4f6212e9b4ee1a1eb5aeb27d2d95 PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/dist/package/Assets/WebGLTemplates/unity-webview.meta b/dist/package/Assets/WebGLTemplates/unity-webview.meta index 4e44b5e0..54f23057 100644 --- a/dist/package/Assets/WebGLTemplates/unity-webview.meta +++ b/dist/package/Assets/WebGLTemplates/unity-webview.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 93029ffc7cd7e472db492ba4cfe91a0a +guid: 16581ca7705a748e7ae763b65b9b230d folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/WebGLTemplates/unity-webview/index.html.meta b/dist/package/Assets/WebGLTemplates/unity-webview/index.html.meta index 90af8542..fee82f54 100644 --- a/dist/package/Assets/WebGLTemplates/unity-webview/index.html.meta +++ b/dist/package/Assets/WebGLTemplates/unity-webview/index.html.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 73f6a2dc0a76a4a14aed7705d914eeb2 +guid: 68ad284e6347447e980f057bcace6525 DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/WebGLTemplates/unity-webview/unity-webview.js.meta b/dist/package/Assets/WebGLTemplates/unity-webview/unity-webview.js.meta index f785468f..9f83e7c9 100644 --- a/dist/package/Assets/WebGLTemplates/unity-webview/unity-webview.js.meta +++ b/dist/package/Assets/WebGLTemplates/unity-webview/unity-webview.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 623a643f151fe4c06b5413aeda2741be +guid: 3c6b87802b0bd400b9e0cdfe19935ad9 DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/WebPlayerTemplates/unity-webview.meta b/dist/package/Assets/WebPlayerTemplates/unity-webview.meta index 16c5927e..5ce68f1a 100644 --- a/dist/package/Assets/WebPlayerTemplates/unity-webview.meta +++ b/dist/package/Assets/WebPlayerTemplates/unity-webview.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3b7bcc95245f44df8ad48e9867f14986 +guid: 1cf3174880ea747098eecd2a05e2fbd9 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/dist/package/Assets/WebPlayerTemplates/unity-webview/index.html.meta b/dist/package/Assets/WebPlayerTemplates/unity-webview/index.html.meta index c83cd439..b62a5e12 100644 --- a/dist/package/Assets/WebPlayerTemplates/unity-webview/index.html.meta +++ b/dist/package/Assets/WebPlayerTemplates/unity-webview/index.html.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d05b07ecde8844cc8abba4af405552c6 +guid: 46d989ca5da264b67927d752dcf9cf0f DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/WebPlayerTemplates/unity-webview/thumbnail.png.meta b/dist/package/Assets/WebPlayerTemplates/unity-webview/thumbnail.png.meta index 1ae06f00..5421d298 100644 --- a/dist/package/Assets/WebPlayerTemplates/unity-webview/thumbnail.png.meta +++ b/dist/package/Assets/WebPlayerTemplates/unity-webview/thumbnail.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 459850ef693344d54ade87e053a8f82d +guid: eb43e5e91f14e438fa2998c40d010c07 DefaultImporter: externalObjects: {} userData: diff --git a/dist/package/Assets/WebPlayerTemplates/unity-webview/unity-webview.js.meta b/dist/package/Assets/WebPlayerTemplates/unity-webview/unity-webview.js.meta index 3fcc98b7..d2573c7f 100644 --- a/dist/package/Assets/WebPlayerTemplates/unity-webview/unity-webview.js.meta +++ b/dist/package/Assets/WebPlayerTemplates/unity-webview/unity-webview.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c50e00e6fb0e1477db48308b3e417637 +guid: f8e9ca46e2cf9489a8c331ec79ee794b DefaultImporter: externalObjects: {} userData: diff --git a/dist/unity-webview-nofragment.unitypackage b/dist/unity-webview-nofragment.unitypackage index 8ea5229a..cdb98d6d 100644 Binary files a/dist/unity-webview-nofragment.unitypackage and b/dist/unity-webview-nofragment.unitypackage differ diff --git a/dist/unity-webview-nofragment.zip b/dist/unity-webview-nofragment.zip index 167c55b3..b6ccdcf7 100644 Binary files a/dist/unity-webview-nofragment.zip and b/dist/unity-webview-nofragment.zip differ diff --git a/dist/unity-webview.unitypackage b/dist/unity-webview.unitypackage index 48ab2614..3071aa1b 100644 Binary files a/dist/unity-webview.unitypackage and b/dist/unity-webview.unitypackage differ diff --git a/dist/unity-webview.zip b/dist/unity-webview.zip index 06e5cc33..40a24dd9 100644 Binary files a/dist/unity-webview.zip and b/dist/unity-webview.zip differ