/// <summary> /// Returns a vector that indicates the spatial dimensions of the specified boundary type. (x = width, y = height, z = depth) /// </summary> public Vector3 GetDimensions(OVRBoundary.BoundaryType boundaryType) { if (OVRManager.loadedXRDevice == OVRManager.XRDevice.Oculus) return OVRPlugin.GetBoundaryDimensions((OVRPlugin.BoundaryType)boundaryType).FromVector3f(); else { #if !USING_XR_SDK && !REQUIRES_XR_SDK Vector3 dimensions; if (Boundary.TryGetDimensions(out dimensions, (boundaryType == BoundaryType.PlayArea) ? Boundary.Type.PlayArea : Boundary.Type.TrackedArea)) return dimensions; #endif return Vector3.zero; } }
/// <summary> /// Returns a vector that indicates the spatial dimensions of the specified boundary type. (x = width, y = height, z = depth) /// </summary> public Vector3 GetDimensions(OVRBoundary.BoundaryType boundaryType) { if (OVRManager.loadedXRDevice == OVRManager.XRDevice.Oculus) { return(OVRPlugin.GetBoundaryDimensions((OVRPlugin.BoundaryType)boundaryType).FromVector3f()); } else { Vector3 dimensions; if (Boundary.TryGetDimensions(out dimensions, (boundaryType == BoundaryType.PlayArea) ? Boundary.Type.PlayArea : Boundary.Type.TrackedArea)) { return(dimensions); } return(Vector3.zero); } }
public static bool TryGetDimensions(out Vector3 dimensionsOut) { Boundary.Type boundaryType = Boundary.Type.PlayArea; return(Boundary.TryGetDimensions(out dimensionsOut, boundaryType)); }