Closed cadwallader closed 7 years ago
What version of Windows are you running?
Hi! I get the same errors without switching the platform to Windows Store, it seems like these variables don't exist in the Holotoolkit script Cursor.cs. Maybe we need a modified version? There's also a missing script reference on the VR Camera Rig. I'm using Windows 10.
I've managed to compile the Hololens app and establish tracking but the app never finds the controllers and as soon as I play in the editor the Steam VR Play Area script disables.
I also get the same errors, from the addition of the:
to the SteamVR_Menu.cs script, not sure how to fix. I'm also on Windows 10. The VR Camera Rig in the Main scene is also missing a script ref:
Found workaround (I think). I'm using Windows 10. I removed the offending code prior to building for HoloLens since !UNITY_WSA_10_0 would evaluate to false anyway if I'm understanding its function correctly.
@andrew-cadwallader There are two classes named Cursor. 1) located in UnityEngine (provides the visible and lockstate functions) 2) located in holotoolkit (HoloToolkit-Examples\SpatialUnderstanding\SpatialUnderstanding-FeatureOverview\Scripts).
Basically, you need to specify to the compiler to use UnityEngine Cursor script. You can do this by replacing Cursor with UnityEngine.Cursor, for example:
UnityEngine.Cursor.visible = savedCursorVisible; UnityEngine.Cursor.lockState = savedCursorLockState;
Hope this helps
The VR Camera Rig in the Main scene is missing a script ref Does this have a difference on the effect of the demo
I don't believe it should. I believe others have noticed the missing ref and still got it to work.
And for the record everyone, I can't currently work on this project because I started an internship just after publishing it. I'll likely continue work on it in the fall.
Thanks @jimmybond will try. Might this explain why I was able to get through the rest of the set up, hear the commands to align the controller to the hologram, but see no vive controller hologram? (Pulling the controller trigger just anywhere didn't do anything either)
understood @dag10 thanks for sharing your work
Works! See solution above by @jimmybond
Upon opening the project folder in Unity, Unity displays the following compile errors (and 4 additional instances of the same errors):
Assets/SteamVR/Scripts/SteamVR_Menu.cs(245,16): error CS0117: 'Cursor' does not contain a definition for 'visible'
Assets/SteamVR/Scripts/SteamVR_Menu.cs(246,10): error CS0117: 'Cursor' does not contain a definition for 'lockState'
these errors map to the following code blocks:
#if !UNITY_WSA_10_0
Cursor.visible = savedCursorVisible;
Cursor.lockState = savedCursorLockState;
#endif
#if !UNITY_WSA_10_0
savedCursorVisible = Cursor.visible;
savedCursorLockState = Cursor.lockState;
#endif
#if !UNITY_WSA_10_0
Cursor.visible = true;
Cursor.lockState = CursorLockMode.None;
#endif