docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetDataAsync

    GetDataAsync(CommandBuffer, Action<NativeArray<T>>)

    Gets data from the GPU buffer asynchronously, via a command buffer.

    Declaration
    public AsyncRequestStatus GetDataAsync(CommandBuffer cmd, Action<NativeArray<T>> callback)
    Parameters
    Type Name Description
    CommandBuffer cmd

    The command buffer. Cannot be null.

    Action<NativeArray<T>> callback

    A callback to run when the data is ready.

    Returns
    Type Description
    AsyncRequestStatus

    The status of an asynchronous request.

    Remarks

    IsEmpty must be false to call this function. Consider using the RequestAsyncReadback<T>(CommandBuffer, StructuredBuffer<T>, Action<NativeArray<T>>) extension method instead. If the request fails, the callback is not called.

    In This Article
    Back to top
    Copyright © 2024 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)