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

Class CaptureGPUBuffer

Inheritance
object
CaptureGPUBuffer
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Capture.dll
Syntax
public static class CaptureGPUBuffer

Methods

Capture<T>(ComputeBuffer, Func<AsyncRequest<object>, Result>)

Perform async read back from the provided compute buffer

Declaration
public static AsyncRequest<object> Capture<T>(ComputeBuffer src, Func<AsyncRequest<object>, AsyncRequest.Result> functor = null) where T : struct
Parameters
Type Name Description
ComputeBuffer src

Compute buffer source to be used for the read back.

Func<AsyncRequest<object>, AsyncRequest.Result> functor

Functor that will be invoked after the async read back request is complete.

Returns
Type Description
AsyncRequest<object>

Returns an AsyncRequest

Type Parameters
Name Description
T

Type for the destination data buffer.

Capture<T>(ComputeBuffer, int, int, Func<AsyncRequest<object>, Result>)

Perform async read back from the provided compute buffer with size and offset.

Declaration
public static AsyncRequest<object> Capture<T>(ComputeBuffer src, int size, int offset, Func<AsyncRequest<object>, AsyncRequest.Result> functor = null) where T : struct
Parameters
Type Name Description
ComputeBuffer src

Compute buffer source to be used for the read back.

int size

Size in bytes of the data to be retrieved from the ComputeBuffer.

int offset

Offset in bytes in the ComputeBuffer.

Func<AsyncRequest<object>, AsyncRequest.Result> functor

Functor that will be invoked after the async read back request is complete.

Returns
Type Description
AsyncRequest<object>

Returns an AsyncRequest

Type Parameters
Name Description
T

Type for the destination data buffer.

Capture<T>(Texture, int, Func<AsyncRequest<object>, Result>)

Perform async read back from the provided source texture.

Declaration
public static AsyncRequest<object> Capture<T>(Texture src, int mipIndex = 0, Func<AsyncRequest<object>, AsyncRequest.Result> functor = null) where T : struct
Parameters
Type Name Description
Texture src

Texture source to be used for the read back.

int mipIndex

Index of the mipmap to be fetched.

Func<AsyncRequest<object>, AsyncRequest.Result> functor

Functor that will be invoked after the async read back request is complete.

Returns
Type Description
AsyncRequest<object>

Returns an AsyncRequest

Type Parameters
Name Description
T

Type for the destination data buffer.

Capture<T>(Texture, int, int, int, int, int, int, int, Func<AsyncRequest<object>, Result>)

Perform async read back from the provided source texture.

Declaration
public static AsyncRequest<object> Capture<T>(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, Func<AsyncRequest<object>, AsyncRequest.Result> functor = null) where T : struct
Parameters
Type Name Description
Texture src

Texture source to be used for the read back.

int mipIndex

Index of the mipmap to be fetched.

int x

Starting X coordinate in pixels of the Texture data to be fetched.

int width

Width in pixels of the Texture data to be fetched.

int y

Starting Y coordinate in pixels of the Texture data to be fetched.

int height

Height in pixels of the Texture data to be fetched.

int z

Start Z coordinate in pixels for the Texture3D being fetched. Index of Start layer for TextureCube, Texture2DArray and TextureCubeArray being fetched.

int depth

Depth in pixels for Texture3D being fetched. Number of layers for TextureCube, TextureArray and TextureCubeArray.

Func<AsyncRequest<object>, AsyncRequest.Result> functor

Functor that will be invoked after the async read back request is complete.

Returns
Type Description
AsyncRequest<object>
Type Parameters
Name Description
T

Type for the destination data buffer.

Capture<T>(Texture, int, GraphicsFormat, Func<AsyncRequest<object>, Result>)

Perform async read back from the provided source texture.

Declaration
public static AsyncRequest<object> Capture<T>(Texture src, int mipIndex, GraphicsFormat dstFormat, Func<AsyncRequest<object>, AsyncRequest.Result> functor = null) where T : struct
Parameters
Type Name Description
Texture src

Texture source to be used for the read back.

int mipIndex

Index of the mipmap to be fetched.

GraphicsFormat dstFormat

Target TextureFormat of the data. If the target format is different from the format stored on the GPU, the conversion is automatic.

Func<AsyncRequest<object>, AsyncRequest.Result> functor

Functor that will be invoked after the async read back request is complete.

Returns
Type Description
AsyncRequest<object>

Returns an AsynRequest

Type Parameters
Name Description
T

Type for the destination data buffer.

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