docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class StructuredBuffer<T>

    Provides a user-friendly and safe interface over ComputeBuffer.

    Inheritance
    object
    StructuredBuffer<T>
    PointCloud
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Mechatronics.SensorSDK
    Assembly: solution.dll
    Syntax
    public class StructuredBuffer<T> where T : unmanaged
    Type Parameters
    Name Description
    T

    The type of elements in the ComputeBuffer. Must be blittable.

    Constructors

    Name Description
    StructuredBuffer(string)

    Initializes and returns an instance of StructuredBuffer.

    Properties

    Name Description
    Capacity

    The allocated number of elements of the underlying buffer. Never smaller than Count (Read Only).

    Count

    The logical number of elements of the underlying buffer (Read Only).

    IsEmpty

    Indicates there are no valid elements in the buffer (Read Only).

    Name

    An optional debug label for the compute buffer.

    Stride

    The size in bytes of a single element (Read Only).

    Methods

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

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

    Release()

    Releases the underlying ComputeBuffer.

    Resize(int, ResizeOptions)

    Reallocates the underlying buffer if necessary, depending on the given options.

    SetData(List<T>, ResizeOptions, CommandBuffer)

    Sends the given data to the GPU buffer, allocating or resizing it if necessary.

    Operators

    Name Description
    explicit operator ComputeBuffer(StructuredBuffer<T>)

    Gets the underlying compute buffer. Can be null if IsEmpty is true.

    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)