Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NativeDisableParallelForRestrictionAttribute

Indicates that multiple jobs can safely access the same NativeContainer at the same time.
Read time 3 minutesLast updated 13 days ago

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