docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BatchReadback

    Batches GPU texture readback requests and flushes them in groups to reduce per-frame overhead.

    Inheritance
    object
    BatchReadback
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.SimulationPro
    Assembly: Unity.SimulationPro.Capture.dll
    Syntax
    public class BatchReadback
    Remarks

    Requests accumulate until BatchSize is reached, then are flushed automatically. The batch is also flushed on shutdown via Manager notification. When async GPU readback is supported it is used; otherwise pixels are read synchronously.

    Fields

    BatchSize

    Number of queued requests that triggers an automatic flush. Defaults to 50.

    Declaration
    public int BatchSize
    Field Value
    Type Description
    int

    Properties

    Instance

    Gets the singleton BatchReadback instance, creating it on first access.

    Declaration
    public static BatchReadback Instance { get; }
    Property Value
    Type Description
    BatchReadback

    Methods

    QueueReadback(AsyncRequest<CaptureState>, Channel, RenderTexture)

    Queue a rendertexture for readback. The readback will happen after the number of requests reaches the batchsize.

    Declaration
    public void QueueReadback(AsyncRequest<CaptureCamera.CaptureState> request, CaptureCamera.Channel channel, RenderTexture renderTexture)
    Parameters
    Type Name Description
    AsyncRequest<CaptureCamera.CaptureState> request

    The request associated with this batch readback instance.

    CaptureCamera.Channel channel

    Which channel this readback is for.

    RenderTexture renderTexture

    Render texture to readback.

    Shutdown()

    Releases all pending requests and clears the singleton instance.

    Declaration
    public void Shutdown()
    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)