docs.unity3d.com
    Show / Hide Table of Contents

    Sample scripts

    The Sentis package comes with a set of sample scripts that show examples of using the API.

    To find the sample scripts:

    • Go to Windows > Package Manager, and select Sentis from the package list.
    • Select Samples.
    • To import a sample folder into your Project, select Import. Unity creates a Samples folder in your Project, and imports the sample folder you selected.
    Sample folder Description
    Add a custom layer An example of adding a custom layer to implement a custom ONNX operator.
    Check the metadata of a model An example of checking the metadata of a model.
    Convert tensors to textures Examples of converting tensors to textures. Refer to Use output data for more information.
    Convert textures to tensors Examples of converting textures to tensors. Refer to Create input for a model for more information.
    Copy a texture tensor to the screen An example of using TextureConverter.RenderToScreen to copy a texture tensor to the screen. Refer to Use output data for more information.
    Do an operation on a tensor An example of using Ops to do an operation on a tensor. Refer to Do operations on tensors for more information.
    Read output asynchronously Examples of reading the output from a model asynchronously using compute shaders. Refer to Read output from a model asynchronously for more information.
    Run a model a layer at a time An example of using StartManualSchedule to run a model a layer a time. Refer to Run a model for more information.
    Run a model Examples of running models with different numbers of inputs and outputs. Refer to Run a model for more information.
    Use a compute buffer An example of using a compute shader to write data to a tensor on the GPU.
    Use Burst to write data An example of using Burst to write data to a tensor in the Job system.
    Use tensor indexing methods Examples of using tensor indexing methods to get and set tensor values.

    Additional resources

    • Unity Discussions group for the Sentis beta
    • Understand the Sentis workflow
    • Understand models in Sentis
    • Tensor fundamentals in Sentis
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023