public static float GetEyeRecommendedResolutionScale() { if (version >= OVRP_1_6_0.version) { return(OVRP_1_6_0.ovrp_GetEyeRecommendedResolutionScale()); } else { return(1.0f); } }
public static bool SetControllerHaptics(uint controllerMask, HapticsBuffer hapticsBuffer) { if (version >= OVRP_1_6_0.version) { return(OVRP_1_6_0.ovrp_SetControllerHaptics(controllerMask, hapticsBuffer) == Bool.True); } else { return(false); } }
public static float GetAppCpuStartToGpuEndTime() { if (version >= OVRP_1_6_0.version) { return(OVRP_1_6_0.ovrp_GetAppCpuStartToGpuEndTime()); } else { return(0.0f); } }
public static HapticsState GetControllerHapticsState(uint controllerMask) { if (version >= OVRP_1_6_0.version) { return(OVRP_1_6_0.ovrp_GetControllerHapticsState(controllerMask)); } else { return(new HapticsState()); } }
public static bool SetOverlayQuad(bool onTop, bool headLocked, IntPtr leftTexture, IntPtr rightTexture, IntPtr device, Posef pose, Vector3f scale, int layerIndex = 0, OverlayShape shape = OverlayShape.Quad) { if (version >= OVRP_1_6_0.version) { uint flags = (uint)OverlayFlag.None; if (onTop) { flags |= (uint)OverlayFlag.OnTop; } if (headLocked) { flags |= (uint)OverlayFlag.HeadLocked; } if (shape == OverlayShape.Cylinder || shape == OverlayShape.Cubemap) { #if UNITY_ANDROID if (version >= OVRP_1_7_0.version) { flags |= (uint)(shape) << OverlayShapeFlagShift; } else #else if (shape == OverlayShape.Cubemap && version >= OVRP_1_10_0.version) { flags |= (uint)(shape) << OverlayShapeFlagShift; } else #endif { return(false); } } if (shape == OverlayShape.OffcenterCubemap) { #if UNITY_ANDROID if (version >= OVRP_1_11_0.version) { flags |= (uint)(shape) << OverlayShapeFlagShift; } else #endif return(false); } return(OVRP_1_6_0.ovrp_SetOverlayQuad3(flags, leftTexture, rightTexture, device, pose, scale, layerIndex) == Bool.True); } if (layerIndex != 0) { return(false); } return(OVRP_0_1_1.ovrp_SetOverlayQuad2(ToBool(onTop), ToBool(headLocked), leftTexture, device, pose, scale) == Bool.True); }