class in Unity.Burst
/
Implemented in:UnityEngine.CoreModule
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 failedFor 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 Your name Your email Suggestion* DescriptionUse this attribute to exclude a method or property from being compiled to native code by the Burst compiler.
By default, Burst compiles all methods in jobs decorated with the [BurstCompile]
attribute. You can use the [BurstDiscard]
attribute on a method or property to exclude code from Burst compilation in situations where it can only run in .NET runtimes. For example, you can use [BurstDiscard]
to exclude methods that use managed objects to perform logging, or methods that check the validity of something only valid in a managed environment.
using Unity.Burst; using Unity.Collections; using Unity.Jobs; using UnityEngine;[BurstCompile] public struct MyJob : IJob { // ...
[BurstDiscard] public void NotExecutedInNative() { Debug.Log("This is a log from a managed job"); }
public void Execute() { // The following method call will not be compiled NotExecutedInNative(); } }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4