Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

BurstCompileAttribute

class in Unity.Burst

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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

Properties

Property 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.

Constructors

Constructor Description
BurstCompileAttribute Tags a struct/method/class as being Burst compiled, with the default BurstCompileAttribute.FloatPrecision, BurstCompileAttribute.FloatMode and BurstCompileAttribute.CompileSynchronously.