docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct Output<T>

    Target interface for tokenization components.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.InferenceEngine.Tokenization
    Assembly: Unity.InferenceEngine.Tokenization.dll
    Syntax
    public readonly ref struct Output<T>
    Type Parameters
    Name Description
    T

    Type of the data to store.

    Constructors

    Output(Action<T>, Func<T, T>)

    Initializes a new instance of the Output<T> type.

    Declaration
    public Output(Action<T> add, Func<T, T> transform = null)
    Parameters
    Type Name Description
    Action<T> add

    The method to call when adding a new T value.

    Func<T, T> transform

    An optional transform method. Common implementation is cloning the value.

    Methods

    Add(T)

    Adds a new value.

    Declaration
    public void Add(T item)
    Parameters
    Type Name Description
    T item

    The value to add.

    AddRange(IEnumerable<T>)

    Adds a collection of values.

    Declaration
    public void AddRange(IEnumerable<T> items)
    Parameters
    Type Name Description
    IEnumerable<T> items

    The values to add.

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