docs.unity3d.com
Search Results for

    Show / Hide Table of Contents
    Note

    Sentis is now called Inference Engine. The documentation has moved to https://docs.unity3d.com/Packages/com.unity.ai.inference@latest. Refer to the new location for the latest updates and guidance. Make sure to update your bookmarks and references accordingly.

    Import a model file

    To import an ONNX model file, drag the file from your computer into the Assets folder of the Project window.

    If your model has external weights files, put them in the same directory as the model file so that Sentis imports them automatically.

    To learn about the models Sentis supports, refer to Supported models.

    Create a runtime model

    To use an imported model, you must use ModelLoader.Load to create a runtime Model object.

    using UnityEngine;
    using Unity.Sentis;
    
    public class CreateRuntimeModel : MonoBehaviour
    {
        public ModelAsset modelAsset;
        Model runtimeModel;
    
        void Start()
        {
            runtimeModel = ModelLoader.Load(modelAsset);
        }
    }
    

    You can then create an engine to run a model.

    Additional resources

    • How Sentis optimizes a model
    • Export an ONNX file from a machine learning framework
    • Model Asset Import Settings
    • Supported models
    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)