diff --git a/README.md b/README.md index f89d1723..f1f0144f 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,9 @@ rebuilt the apk. Although some old/buggy devices may not work well with `android:hardwareAccelerated="true"`, the WebView runs very smoothly with this setting. -For Unity 5.6 or newer, you also need to modify `android:name` from +*NOTE: Unity 5.6.1p4 or newer (including 2017 1.0) seems to fix the issue. cf. https://github.com/gree/unity-webview/pull/212#issuecomment-314952793* + +For Unity 5.6.0 and 5.6.1 (except 5.6.1p4), you also need to modify `android:name` from `com.unity3d.player.UnityPlayerActivity` to `net.gree.unitywebview.CUnityPlayerActivity`. This custom activity implementation will adjust Unity's SurfaceView z order. Please refer diff --git a/plugins/Android/Editor/UnityWebViewPostprocessBuild.cs b/plugins/Android/Editor/UnityWebViewPostprocessBuild.cs index c0a1cd0e..11c368ee 100644 --- a/plugins/Android/Editor/UnityWebViewPostprocessBuild.cs +++ b/plugins/Android/Editor/UnityWebViewPostprocessBuild.cs @@ -34,7 +34,7 @@ public static void OnPostprocessBuild(BuildTarget buildTarget, string path) { doc.Save(manifest); Debug.LogError("adjusted AndroidManifest.xml about android:hardwareAccelerated. Please rebuild the app."); } -#if UNITY_5_6_OR_NEWER +#if UNITY_5_6_0 || UNITY_5_6_1 if (activity != null && activity.GetAttribute("android:name") == "com.unity3d.player.UnityPlayerActivity") { activity.SetAttribute("name", "http://schemas.android.com/apk/res/android", "net.gree.unitywebview.CUnityPlayerActivity");