Unity3d 关于统一白日梦的UI问题

Unity3d 关于统一白日梦的UI问题,unity3d,virtual-reality,daydream,Unity3d,Virtual Reality,Daydream,正如您在附件中看到的,我的Unity项目中的游戏视图存在一些问题。它看起来像是在增加主视图的较小片段中复制视图。有什么办法吗 我正在用Daydream VR资产运行Unity 5.6.0测试版 这将在下一次更新中修复。同时,请使用发布的解决方案: 这似乎是5.6中介绍的一个问题。我不确定这是一个统一的预期变化还是一个倒退。在我们找到解决方案之前,以下更改将为SDK用户纠正这一问题 欢迎来到StackOverflow。请指出链接中的内容,以便答案有用。最好的 diff --git a/Google

正如您在附件中看到的,我的Unity项目中的游戏视图存在一些问题。它看起来像是在增加主视图的较小片段中复制视图。有什么办法吗

我正在用Daydream VR资产运行Unity 5.6.0测试版


这将在下一次更新中修复。同时,请使用发布的解决方案:

这似乎是5.6中介绍的一个问题。我不确定这是一个统一的预期变化还是一个倒退。在我们找到解决方案之前,以下更改将为SDK用户纠正这一问题


欢迎来到StackOverflow。请指出链接中的内容,以便答案有用。最好的
diff --git a/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs b/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs
index 06e3692..8ce0021 100644
--- a/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs
+++ b/GoogleVR/Legacy/Scripts/Internal/GvrEye.cs
@@ -210,6 +210,7 @@ public class GvrEye : MonoBehaviour {
       stereoEffect = GetComponent<StereoRenderEffect>();
       if (stereoEffect == null) {
         stereoEffect = gameObject.AddComponent<StereoRenderEffect>();
+        stereoEffect.eye = eye;
       }
       stereoEffect.enabled = true;
     } else if (stereoEffect != null) {
diff --git a/GoogleVR/Legacy/Scripts/Internal/StereoRenderEffect.cs b/GoogleVR/Legacy/Scripts/Internal/StereoRenderEffect.cs
index d7020b1..cb18c00 100644
--- a/GoogleVR/Legacy/Scripts/Internal/StereoRenderEffect.cs
+++ b/GoogleVR/Legacy/Scripts/Internal/StereoRenderEffect.cs
@@ -26,7 +26,9 @@ public class StereoRenderEffect : MonoBehaviour {

   private Camera cam;

-  private static readonly Rect fullRect = new Rect(0, 0, 1, 1);
+  private Rect fullRect;
+
+  public GvrViewer.Eye eye;

   void Awake() {
     cam = GetComponent<Camera>();
@@ -34,6 +36,7 @@ public class StereoRenderEffect : MonoBehaviour {

   void Start() {
     material = new Material(Shader.Find("GoogleVR/UnlitTexture"));
+    fullRect = (eye == GvrViewer.Eye.Left ? new Rect (0, 0, 0.5f, 1) : new Rect (0.5f, 0, 0.5f, 1));
   }

   void OnRenderImage(RenderTexture source, RenderTexture dest) {