docs.unity3d.com
    Show / Hide Table of Contents

    Class ModelAssetExtensions

    Represents extensions for the ModelAsset class.

    Inheritance
    Object
    ModelAssetExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Sentis
    Syntax
    public static class ModelAssetExtensions

    Methods

    CreateWorker(ModelAsset, DeviceType, Boolean)

    Initializes and returns an instance of IWorker with a modelAsset to execute. Sentis selects the best backend type available for device.

    This is a convenience method that internally calls ModelLoader.Load followed by WorkerFactory.CreateWorker.

    Declaration
    public static IWorker CreateWorker(this ModelAsset modelAsset, DeviceType deviceType, bool verbose = false)
    Parameters
    Type Name Description
    ModelAsset modelAsset

    The model asset to execute.

    DeviceType deviceType

    The preferred device for execution. For example DeviceType.GPU specifies the fast GPU path

    Boolean verbose

    Whether to log scheduling of layers execution to the console.

    Returns
    Type Description
    IWorker

    Worker instance

    In This Article
    • Methods
      • CreateWorker(ModelAsset, DeviceType, Boolean)
    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