原因可能是因为StreamVR软件更新与Unity的插件接口不匹配,
1.可能是SteamVR版本过高/低 或Unity版本过低/高
2.可以将如下代码替换
3.将SteamVR_UpdatePoses 脚本挂到VR相机上(也就是eyes上)
using UnityEngine;
using Valve.VR;
[RequireComponent(typeof(Camera))]
public class SteamVR_UpdatePoses : MonoBehaviour
{
void Awake()
{
var camera = GetComponent<Camera>();
#if !(UNITY_5_3 || UNITY_5_2 || UNITY_5_1 || UNITY_5_0)
camera.stereoTargetEye = StereoTargetEyeMask.None;
#endif
camera.clearFlags = CameraClearFlags.Nothing;
camera.useOcclusionCulling = false;
camera.cullingMask = 0;
camera.depth = -9999;
}
void OnPreCull()
{
var compositor = OpenVR.Compositor;
if (compositor != null)
{
var render = SteamVR_Render.instance;
compositor.GetLastPoses(render.poses, ren