IEnumerator UpdateBounds() { GetComponent <MeshFilter>().mesh = null; // clear existing var vr = SteamVR.instance; if (vr == null) { yield break; } var error = HmdError.None; var pChaperone = OpenVR.GetGenericInterface(OpenVR.IVRChaperone_Version, ref error); if (pChaperone == System.IntPtr.Zero || error != HmdError.None) { yield break; } var chaperone = new CVRChaperone(pChaperone); while (chaperone.GetCalibrationState() != ChaperoneCalibrationState.OK) { yield return(null); } BuildMesh(); }
private IEnumerator UpdateBounds() { base.GetComponent <MeshFilter>().mesh = null; CVRChaperone chaperone = OpenVR.Chaperone; if (chaperone == null) { yield break; } while (chaperone.GetCalibrationState() != ChaperoneCalibrationState.OK) { yield return(null); } this.BuildMesh(); yield break; }
IEnumerator UpdateBounds() { GetComponent <MeshFilter>().mesh = null; // clear existing CVRChaperone chaperone = OpenVR.Chaperone; if (chaperone == null) { yield break; } while (chaperone.GetCalibrationState() != ChaperoneCalibrationState.OK) { yield return(null); } BuildMesh(); }