docs.unity3d.com
Search Results for

    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 and FloatMode.

    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
    {
        //....
    }
    In This Article
    Back to top
    Copyright © 2025 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)