docs.unity.cn
    Show / Hide Table of Contents

    Method WithCode

    WithCode<TDescription>(TDescription, LambdaSingleJobDescriptionConstructionMethods.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

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, September 20, 2023