docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct CaptureCamera.CaptureState

    Capture state when asynchronously capturing a camera render.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.SimulationPro
    Assembly: Unity.SimulationPro.Capture.dll
    Syntax
    public struct CaptureCamera.CaptureState

    Fields

    camera

    The camera associated with this capture request.

    Declaration
    public Camera camera
    Field Value
    Type Description
    Camera

    colorBuffer

    While in flight, references the source buffer to read from. When completed, references the captured data in Array form.

    Declaration
    public object colorBuffer
    Field Value
    Type Description
    object

    colorFunctor

    Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.

    Declaration
    public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> colorFunctor
    Field Value
    Type Description
    Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result>

    colorTrigger

    Action to populate the command buffer to readback a color target.

    Declaration
    public Action<CommandBuffer, RenderTargetIdentifier> colorTrigger
    Field Value
    Type Description
    Action<CommandBuffer, RenderTargetIdentifier>

    depthBuffer

    While in flight, references the source buffer to read from. When completed, references the captured data in Array form.

    Declaration
    public object depthBuffer
    Field Value
    Type Description
    object

    depthFunctor

    Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.

    Declaration
    public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> depthFunctor
    Field Value
    Type Description
    Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result>

    depthTrigger

    Action to populate the command buffer to readback a depth target.

    Declaration
    public Action<CommandBuffer, RenderTargetIdentifier> depthTrigger
    Field Value
    Type Description
    Action<CommandBuffer, RenderTargetIdentifier>

    frame

    The frame number this request was issued on.

    Declaration
    public int frame
    Field Value
    Type Description
    int

    motionBuffer

    While in flight, references the source buffer to read from. When completed, references the captured data in Array form.

    Declaration
    public object motionBuffer
    Field Value
    Type Description
    object

    motionFunctor

    Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.

    Declaration
    public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> motionFunctor
    Field Value
    Type Description
    Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result>

    motionTrigger

    Action to populate the command buffer to readback a motion target.

    Declaration
    public Action<CommandBuffer, RenderTargetIdentifier> motionTrigger
    Field Value
    Type Description
    Action<CommandBuffer, RenderTargetIdentifier>

    normalBuffer

    While in flight, references the source buffer to read from. When completed, references the captured data in Array form.

    Declaration
    public object normalBuffer
    Field Value
    Type Description
    object

    normalFunctor

    Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.

    Declaration
    public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> normalFunctor
    Field Value
    Type Description
    Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result>

    normalTrigger

    Action to populate the command buffer to readback a normal target.

    Declaration
    public Action<CommandBuffer, RenderTargetIdentifier> normalTrigger
    Field Value
    Type Description
    Action<CommandBuffer, RenderTargetIdentifier>

    requestedDepthFormat

    The graphics format requested for depth readback (e.g. R16_UNorm or R32_SFloat). Used by the URP depth path so AsyncGPUReadback can convert from the internal R32_SFloat RTHandle to the caller's requested format.

    Declaration
    public GraphicsFormat requestedDepthFormat
    Field Value
    Type Description
    GraphicsFormat

    Properties

    completed

    Property to determine if the capture request has completed.

    Declaration
    public bool completed { get; }
    Property Value
    Type Description
    bool

    true if all channel functors are null (completed); otherwise false.

    Methods

    GetFunctor(Channel)

    Help method to get the completion functor for the specified channel.

    Declaration
    public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> GetFunctor(CaptureCamera.Channel channel)
    Parameters
    Type Name Description
    CaptureCamera.Channel channel

    Enumeration value for which channel you are specifying.

    Returns
    Type Description
    Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result>

    The completion functor currently assigned to the specified channel, or null if the channel has already completed.

    SetBuffer(Channel, object)

    Helper method to set the buffer for a specified channel.

    Declaration
    public void SetBuffer(CaptureCamera.Channel channel, object buffer)
    Parameters
    Type Name Description
    CaptureCamera.Channel channel

    Enumeration value for which channel you are specifying.

    object buffer

    Object specifying the buffer you are setting for the specified channel.

    SetFunctor(Channel, Func<AsyncRequest<CaptureState>, Result>)

    Helper method to set the completion functor for a specified channel.

    Declaration
    public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> SetFunctor(CaptureCamera.Channel channel, Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> functor)
    Parameters
    Type Name Description
    CaptureCamera.Channel channel

    Enumeration value for which channel you are specifying.

    Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> functor

    Completion functor for handling the captured data when available.

    Returns
    Type Description
    Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result>

    The previous completion functor.

    SetTrigger(Channel, Action<CommandBuffer, RenderTargetIdentifier>)

    Help method to set the command buffer to use, for the specified channel.

    Declaration
    public Action<CommandBuffer, RenderTargetIdentifier> SetTrigger(CaptureCamera.Channel channel, Action<CommandBuffer, RenderTargetIdentifier> action)
    Parameters
    Type Name Description
    CaptureCamera.Channel channel

    Enumeration value for which channel you are specifying.

    Action<CommandBuffer, RenderTargetIdentifier> action

    Action to populate the command buffer.

    Returns
    Type Description
    Action<CommandBuffer, RenderTargetIdentifier>

    The previous trigger action that was set for the specified channel, or null if none was assigned.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)