Class BurstCompatibleAttribute
Documents and enforces (via generated tests) that the tagged method or property has to stay burst compatible.
Namespace: Unity.Collections
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple = true)]
public class BurstCompatibleAttribute : Attribute, _Attribute
Fields
RequiredUnityDefine
Declaration
public string RequiredUnityDefine
Field Value
Type | Description |
---|---|
String |
Properties
GenericTypeArguments
Types to be used for the declared generic type or method.
Declaration
public Type[] GenericTypeArguments { get; set; }
Property Value
Type | Description |
---|---|
Type[] |
Remarks
The generic type arguments are tracked separately for types and methods. Say a generic type also contains a generic method, like in the case of Foo<T>.Bar<U>(T baz, U blah). You must specify GenericTypeArguments for Foo and also for Bar to establish the concrete types for T and U. When code generation occurs for the Burst compatibility tests, any time T appears (in the definition of Foo) it will be replaced with the generic type argument you specified for Foo and whenever U appears (in method Bar's body) it will be replaced by whatever generic type argument you specified for the method Bar.