docs.unity3d.com
    Show / Hide Table of Contents

    Constructor BurstCompileAttribute

    BurstCompileAttribute()

    Tags a struct/method/class as being burst compiled, with the default FloatPrecision, FloatMode and CompileSynchronously.

    Declaration
    public BurstCompileAttribute()
    Examples
    [BurstCompile]
    struct MyMethodsAreCompiledByBurstUsingTheDefaultSettings
    {
        //....
    }

    BurstCompileAttribute(FloatPrecision, FloatMode)

    Tags a struct/method/class as being burst compiled, with the specified FloatPrecision, FloatMode and the default CompileSynchronously.

    Declaration
    public BurstCompileAttribute(FloatPrecision floatPrecision, FloatMode floatMode)
    Parameters
    Type Name Description
    FloatPrecision floatPrecision

    Specify the required floating point precision.

    FloatMode floatMode

    Specify the required floating point mode.

    Examples
    [BurstCompile(FloatPrecision.Low,FloatMode.Fast)]
    struct MyMethodsAreCompiledByBurstWithLowPrecisionAndFastFloatingPointMode
    {
        //....
    }
    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