- Home /
First VR experiment: IndexOutOfRangeException: Array index is out of range.
Hey guys,
I'm trying to learn abit of unity vr development and I was following a guide in this link: https://www.youtube.com/watch?v=p9u3yLUR5CQ&t=635s
I followed everything to the letter but for some reason i'm getting the following exception once I start the game:
IndexOutOfRangeException: Array index is out of range. SteamVR_Controller.Input (Int32 deviceIndex) (at Assets/SteamVR/Scripts/SteamVR_Controller.cs:151) flying.Update () (at Assets/flying.cs:16)
Could anyone help me with this ? :)
Are you using the [CameraRig] prefab from S$$anonymous$$mVR or did you add the s$$anonymous$$mvrs script to your own camera?
Answer by merstik · May 17, 2017 at 07:21 AM
Thanks for the help all but I have already found a solution on my own. Apparently Unity 5.6 doesn't support SteamVR and it's a known bug (that is not gonna be fixed for some reason :S) so downgrading to 5.5 solved the problem.
Answer by Fritsl · May 14, 2017 at 08:08 PM
Well, have a look at Assets/flying.cs, line 16, there's apparently an array called at a [number] larger than the array.length .. Have not seen the video, but that's where the error is at least from the log, hope it helps somehow - debug.log the array length just before, see what is called, the error is somewhere there :)
Your answer
Follow this Question
Related Questions
Preparing the build for HTC Vive 1 Answer
SteamVR prefabs work in one project, but not another 1 Answer
[HTC Vive] Mix Reality using Steam VR without the third controller 0 Answers
Input module SteamVR 2.0 with Unity 2018 1 Answer
Change the position and scale of gameobject1 with respect to gamobject2 0 Answers