Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Configure Burst compilation

Read time 1 minuteLast updated 10 days ago

Use Burst's custom C# attributes to define which parts of your code Burst compiles. These attributes and their parameters also allow you to configure a range of compilation options to improve Burst performance in different contexts.

Topic

Description

Marking code for Burst compilationUse the
[BurstCompile]
attribute to mark code for Burst compilation. Use attribute parameters to customize aspects of Burst compilation and improve performance.
Excluding code from Burst compilationUse the
[BurstDiscard]
attribute to selectively exclude portions of code from Burst compilation.
Defining Burst options for an assemblyApply the
[BurstCompile]
attribute at the assembly level to define Burst compilation options for a whole assembly.
Burst compilation in Play modeBurst provides the option to compile asynchronously or synchronously in Play mode. Understand these options and how and when to configure synchronous compilation.
Generic jobsUnderstand important limitations in Burst's support for generic jobs and function pointers.
Float precision and determinismUse the relevant APIs to configure the degree of accuracy and determinism in Burst's floating point number calculations.
Compilation warnings referenceFix common compilation warnings.

Additional resources