Requested camera position. To access both left and right camera simultaneously, create two instances of PassthroughCameraAccess with different PassthroughCameraAccess.CameraPosition
Vector2Int RequestedResolution[Get]
The requested resolution of the camera. If the requested resolution is not present in GetSupportedResolutions, the first smaller resolution will be selected instead.
Material TargetMaterial[Get]
Properties
string TexturePropertyName[Get]
The name of the texture property to update.
If changed at runtime, we recache the shader property ID so that Material.SetTexture(...) uses the new name.
bool IsPlaying[Get]
Indicates whether the component is enabled and has received the camera image at least once.
DateTime Timestamp[Get]
Timestamp associated with the current camera image.
Vector2Int CurrentResolution[Get]
The current resolution of camera. May be different from the RequestedResolution.
The static intrinsic parameters of the sensor. These parameters become available after the PassthroughCameraAccess is enabled and never change after that.
bool IsUpdatedThisFrame[Get]
Returns 'true' if the camera texture was updated this frame.
static bool IsSupported[Get]
Returns true if the current headset supports Passthrough Camera Access.
Member Functions
NativeArray< Color32 > GetColors ( )
Retrieves color data of the latest camera image.
Use this method to process camera images on CPU.
Do not cache, modify or dispose the contents of the returned native array.
Returns
Native array that contains all pixels of the captured image.
Texture GetTexture ( )
Retrieves GPU texture of the latest camera image.
Use this method to access camera images on GPU.
Returns
Texture with the latest camera image.
Ray ViewportPointToRay
( Vector2 viewportPoint )
Returns a world-space ray going from camera through a viewport point.
Parameters
viewportPoint
Viewport-space is normalized and relative to the camera. The bottom-left of the camera is (0,0); the top-right is (1,1).
Returns
World-space ray.
Vector2 WorldToViewportPoint
( Vector3 worldPosition )
Transforms worldPosition from world-space into viewport-space.
Parameters
worldPosition
A world-space position.
Returns
Viewport-space coordinate. Viewport-space is normalized and relative to the camera. The bottom-left of the camera is (0,0); the top-right is (1,1).