文档

Unity Engine

Unity Engine

NativeDisableParallelForRestrictionAttribute

Indicates that multiple jobs can safely access the same NativeContainer at the same time.
阅读时间3 分钟最后更新于 1 个月前

Definition

[AttributeUsage(AttributeTargets.Field)]public sealed class NativeDisableParallelForRestrictionAttribute : Attribute

Remarks

Usually it's unsafe for multiple jobs to access the same NativeContainer at the same time. This attribute makes it safe to do so, and is a required attribute for [wiki:JobSystemParallelForJobs|parallel jobs]]. A parallel job needs this attribute because you must define how to safely access a native container yourself, and
NativeDisableParallelForRestriction
lets you ignore multiple reads and writes to a container.

Inheritance

Inherited Members