docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License
Show / Hide Table of Contents
    • AddCollectorMenuAttribute
    • CameraGrab_Editor
    • CaptureCollector
    • JpegEncoder
    • JpegEncoder.Flags
    • JpegEncoder.PixelFormat
    • JpegEncoder.SubSample
    • PngEncoder
    • PngEncoder.ColorType
    • PngEncoder.PngParam
  • Unity.Simulation
    • AggregatedSample
    • AggregationEvent
    • ArrayCast
    • ArrayUtilities
    • AsyncRequest
    • AsyncRequest.ExecutionContext
    • AsyncRequest.Result
    • AsyncRequest.State
    • AsyncRequest<T>
    • BaseDataConsumer<T>
    • BaseDataConsumer<T>.Uploadable
    • BaseLogger
    • BatchReadback
    • CameraGrab
    • CaptureCamera
    • CaptureCamera.CaptureState
    • CaptureCamera.Channel
    • CaptureCamera.ReadbackCompletionDelegate
    • CaptureCamera.RequestCompletionDelegate
    • CaptureGPUBuffer
    • CaptureImageEncoder
    • CaptureImageEncoder.ImageFormat
    • CaptureOptions
    • CaptureRenderTexture
    • Category
    • ChannelGrab
    • ChunkedStream
    • CollectorBase
    • CollectorBase.ConsumeCollectorReport
    • CollectorElement
    • CollectorsBaseEditor
    • CollectorsList
    • ContentType
    • ContinuousEvents
    • ContinuousEvents.EventCollectionDelegate
    • ContinuousEvents.EventDispatchDelegate
    • CoreProfilerUtils
    • CounterEvent
    • CounterEventData
    • DXChunkedStream
    • DXFile
    • DXFormat
    • DXManager
    • DXTimeLogger
    • DataCapturePaths
    • DepthGrab
    • DirectoryNameComponent
    • Dispatcher
    • EventBase
    • ExecUtility
    • ExitPlaymode
    • ExtensionNameComponent
    • FileNameComponent
    • FileProducer
    • ForceFlip
    • Format
    • FrameCountCondition
    • FrameLimit
    • FrameNumberNameComponent
    • GeneralUtilities
    • GraphicsUtilities
    • ICondition
    • IDataProduced
    • IGlobalProfilerDataDispatcher
    • IgnoreCollectorAttribute
    • LabelNameComponent
    • LambdaJob
    • LambdaJob.DelegateType
    • Log
    • Log.Level
    • Logger
    • LoggerSuffixOption
    • Manager
    • Manager.NotificationDelegate
    • Manager.TickDelegate
    • NameComponent
    • NameGenerator
    • Options
    • PackageImportTests
    • PathUtility
    • PerfStatsManager
    • PlayerResolution
    • PlayerResolutionSettings
    • ProfilerManager
    • ProfilerProperties
    • ProfilerReport
    • ProfilerSamplingEvent
    • ReadbackRequest
    • RenderPassCallbackDelegate
    • RenderingPipelineType
    • ReportingUtils
    • SRPSupport
    • Sample
    • SampleProfilerCollector
    • ScreenCapture
    • SequenceNameComponent
    • SequencedPathName
    • SimSecondsCondition
    • SimulationProfiler
    • SimulationProfilerBase
    • SimulationProfilerEditor
    • TestUtility
    • ThreadUtility
    • TimeLimit
    • TimeLogger
    • TimeScale
    • TimeScaleEditor
    • TimeUtility
    • Timer
    • TimerSource
    • TimestampNameComponent
    • URPCallbackPass
    • URPCaptureRendererFeature
    • UnityVersion
    • WallSecondsCondition

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.Simulation
Assembly: Unity.Simulation.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 completed, false otherwise.

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>

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>
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