docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateWorker

    CreateWorker(ModelAsset, DeviceType, bool)

    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

    bool verbose

    Whether to log scheduling of layers execution to the console.

    Returns
    Type Description
    IWorker

    The instantiated IWorker.

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