正如你在附图中看到的,我的Unity项目中的游戏视图有一些问题。它看起来像是在增加主视图的较小片段中复制视图。有什么办法解决这个问题吗?
我正在使用Daydream VR资源运行Unity 5.6.0测试版。

发布于 2017-02-22 01:54:30
这个问题将在下一次更新中修复。在此期间,请使用发布的below解决方法
这看起来是5.6中引入的问题。我不确定这是Unity的一次有意改变还是一次倒退。在我们有一个解决方案之前,下面的更改将为SDK的用户纠正这个问题。
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) {https://stackoverflow.com/questions/42310525
复制相似问题