docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct Model.Output

    Represents an output of a model. Use this struct to access or modify the outputs of a model.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.InferenceEngine
    Assembly: Unity.InferenceEngine.dll
    Syntax
    public struct Model.Output
    Remarks

    An Output is defined by a name and an index. When the Worker runs the inference over the model, you can access a specific output either by its name or by its index to get the result values. See Worker.

    The index field identifies the output internally. Do not confuse it with the index (position) of the Output in the List outputs.

    Examples

    Add an output to a model.

    var model = ModelLoader.Load(modelAsset);
    var output = new Model.Output { index = 1234, name = "output" };
    model.outputs.Add(output);

    Fields

    index

    The index of the output.

    Declaration
    public int index
    Field Value
    Type Description
    int

    name

    The name of the output.

    Declaration
    public string name
    Field Value
    Type Description
    string
    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)