docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method WithCode

    WithCode<TDescription>(TDescription, WithCodeAction)

    Provides an easy way to run a function as a single background job. You can also run Job.WithCode on the main thread and still take advantage of Burst compilation to speed up execution.

    Declaration
    public static TDescription WithCode<TDescription>(this TDescription description, LambdaSingleJobDescriptionConstructionMethods.WithCodeAction code) where TDescription : ISingleJobDescription
    Parameters
    Type Name Description
    TDescription description

    The target object

    LambdaSingleJobDescriptionConstructionMethods.WithCodeAction code

    Lambda that provides the execution for the job.

    Returns
    Type Description
    TDescription

    The target object, suitable for chaining multiple methods

    Type Parameters
    Name Description
    TDescription

    Type of target object

    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)