docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BurstCompileAttribute

    This attribute is used to tag jobs or function-pointers as being Burst compiled, and optionally set compilation parameters.

    Inheritance
    object
    Attribute
    BurstCompileAttribute
    Inherited Members
    Attribute.Equals(object)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetHashCode()
    Attribute.IsDefaultAttribute()
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.Match(object)
    Attribute.TypeId
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Burst
    Assembly: Unity.Burst.dll
    Syntax
    [AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method)]
    public class BurstCompileAttribute : 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 and FloatMode.

    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.

    DisableDirectCall

    Gets or sets a boolean to disable the translation of a static method call as direct call to the generated native method. By default, when compiling static methods with Burst and calling them from C#, they will be translated to a direct call to the Burst generated method. code.

    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.

    OptimizeFor

    How should this entry-point be optimized.

    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)