API reference

DepthTextureAccess Class

Extends MonoBehaviour

Fields

OnDepthTextureUpdateCPU : Action< DepthFrameData >
Invoked when a new depth frame has been copied to CPU memory.
Supplies a DepthFrameData struct with depth values and view/projection data for consumers such as ObjectDetectionVisualizer.
Signature
Action<DepthFrameData> OnDepthTextureUpdateCPU

Properties

IsInitialized : bool
[Get]
Indicates whether the depth texture has been initialized and TextureSize has been set.
Signature
bool IsInitialized
TextureSize : int
[Get]
Edge-aligned square size (in pixels) of the downsampled depth texture used for CPU readback and intersection tests.
This is dynamically determined from the depth texture at runtime.
Only access this property after IsInitialized is true to ensure the texture size has been properly determined from the actual depth texture.
Signature
int TextureSize

Methods

RequestDepthSample ()
Triggers a depth sample immediately.
Called by inference agents to synchronize depth sampling with inference runs.
Signature
void RequestDepthSample()
Returns
void

Inner Struct

DepthFrameData Struct

Fields

CameraPose : Pose
Signature
Pose CameraPose
DepthTexturePixels : NativeArray< float >
Signature
NativeArray<float> DepthTexturePixels
ViewProjectionMatrix : Matrix4x4[]
Signature
Matrix4x4 [] ViewProjectionMatrix