docs.unity3d.com
    Show / Hide Table of Contents

    Class BurstCompileAttribute

    This attribute can be used to tag jobs as being Burst Compiled, and optionally set some compilation parameters.

    Inheritance
    Object
    BurstCompileAttribute
    Namespace: Unity.Burst
    Syntax
    public class BurstCompileAttribute : System.Attribute

    Constructors

    Name Description
    BurstCompileAttribute()

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

    BurstCompileAttribute(FloatPrecision, FloatMode)

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

    Properties

    Name Description
    CompileSynchronously

    Gets or sets whether or not to burst compile the code immediately on first use, or in the background over time.

    Debug

    Gets or sets whether to compile the code in a way that allows it to be debugged. If this is set to true, the current implementation disables optimisations on this method allowing it to be debugged using a Native debugger.

    DisableSafetyChecks

    Gets or sets whether to disable safety checks for the current job or function pointer. If this is set to true, the current job or function pointer will be compiled with safety checks disabled unless the global 'Safety Checks/Force On' option is active.

    FloatMode

    Gets or sets the float mode of operation for this burst compilation.

    FloatPrecision

    Gets or sets the floating point precision to use for this burst compilation. Allows you to trade accuracy for speed of computation, useful when you don't require much precision.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Wednesday, August 25, 2021