当我在看某鸥的视频的时候,里面讲到用Unity做一个贪食蛇后,加入SteamVR插件,并且能用手柄控制蛇的移动.当我跟着上面一步一步做的时候,发现我代码都写完后,启动报错,而视频里面的老师讲的缺没有报错.后来我修改了一下原本报错的是这句: var device = SteamVR_Controller.Input((int)track.index);//track是手柄上的SteamVR_TrackObject脚本 报错的提示是这样的: ndexOutOfRangeException: Arra
1 Unity原生 1.1 GUI void OnGUI(){ if(GUI.Button(Rect position, string text)){ //点击后立即执行 } 1.1 Input 每个手指触控是通过Input.touches数据结构描述的: fingerId 手指索引 The unique index for a touch. 触摸的唯一索引. position 位置 The screen position of the touch. 触摸屏幕的位置. deltaPosition