Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BurstCompileAttribute

Tags a struct/method/class as being Burst compiled, with the default BurstCompileAttribute.FloatPrecision, BurstCompileAttribute.FloatMode and BurstCompileAttribute.CompileSynchronously.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Constructor
  • Namespace: Unity.Burst
  • Assembly: UnityEngine.BurstModule

BurstCompileAttribute()

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

Examples

[BurstCompile]struct MyMethodsAreCompiledByBurstUsingTheDefaultSettings{ //....}

BurstCompileAttribute(FloatPrecision, FloatMode)

Tags a struct/method/class as being Burst compiled, with the specified BurstCompileAttribute.FloatPrecision and BurstCompileAttribute.FloatMode.
public BurstCompileAttribute(FloatPrecision floatPrecision, FloatMode floatMode)

Parameters

floatPrecision

Specify the required floating point precision.

floatMode

Specify the required floating point mode.

Examples

[BurstCompile(FloatPrecision.Low, FloatMode.Fast)]struct MyMethodsAreCompiledByBurstWithLowPrecisionAndFastFloatingPointMode{ //....}